write a program to display reverse of a number using for
loop?
Answer Posted / vishnu
int main()
{
int num;
int i;
int a[10];
printf("enter the number \n");
scanf("%d",&num);
for(i =0;num;i++)
{
a[i]=num %10;
num= num/10;
printf("%d",a[i]);
}
getch();
}
| Is This Answer Correct ? | 29 Yes | 21 No |
Post New Answer View All Answers
What do you mean by c what are the main characteristics of c language?
List the difference between a While & Do While loops?
Write a progarm to find the length of string using switch case?
Write a program to print ASCII code for a given digit.
Can we compile a program without main() function?
What are the main characteristics of c language describe the structure of ac program?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What are the 32 keywords in c?
What is a pointer in c?
Who developed c language?
Explain what are run-time errors?
What language is lisp written in?
string reverse using recursion
Describe the header file and its usage in c programming?
What are types of functions?