void main()
{
char ch[10]="";
char c;
int k=0,l,i;
printf("Enter a number:");
scanf("%d",&i);
while(i!=0) //reversing a numbr
{ k=k*10+i%10;
i=i/10;}
while(k!=0) //converting a number to string
{ c=48+k%10;
strcat(ch,&c);
k=k/10;}
printf("\n%s",c h);
}
its posing an error of abnormal termination and not getting output as expected!!
{
char ch[10]="";
char c;
int k=0,l,i;
printf("Enter a number:");
scanf("%d",&i);
while(i!=0) //reversing a numbr
{ k=k*10+i%10;
i=i/10;}
while(k!=0) //converting a number to string
{ c=48+k%10;
strcat(ch,&c);
k=k/10;}
printf("\n%s",c h);
}
its posing an error of abnormal termination and not getting output as expected!!
Comment