to find out the reverse digit of a given number

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
int n,a;
printf("enter the number to be reversed :");
scanf("%d",&n);
printf("the reversed number is :");
for(int i=0;n>0;i++)
{
a=n%10;
n=n/10;
printf("%d",a);
}
getch();
}

Is This Answer Correct ?    74 Yes 37 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

658


What is volatile keyword in c?

583


Write a program to check armstrong number in c?

635


What is use of bit field?

774


Why c is known as a mother language?

646






Is null valid for pointers to functions?

613


write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list

2238


What does %c mean in c?

652


How can I find the modification date and time of a file?

604


What is const volatile variable in c?

578


What is meant by type casting?

629


What are the characteristics of arrays in c?

616


Which node is more powerful and can handle local information processing or graphics processing?

829


How are 16- and 32-bit numbers stored?

725


What are external variables in c?

546