write a program to display reverse of a number using for
loop?
Answer Posted / balaji ganesh
#include<stdio.h>
#include<string.h>
void main()
{
char a[50];
int i,n;
clrscr();
printf("\n enter number:");
scanf("%s",a);
printf("reverse number is:");
for(i=strlen(a);i>=0;i--)
{
printf("%c",a[i]);
}
getch();
}
Is This Answer Correct ? | 29 Yes | 26 No |
Post New Answer View All Answers
What is the significance of an algorithm to C programming?
What are the advantages of using new operator as compared to the function malloc ()?
What are extern variables in c?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
What are pointers in C? Give an example where to illustrate their significance.
Why is c platform dependent?
What is page thrashing?
What is a built-in function in C?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is #include stdio h and #include conio h?
What is meant by errors and debugging?
a c code by using memory allocation for add ,multiply of sprase matrixes
How do you determine whether to use a stream function or a low-level function?
What is the difference between text files and binary files?
What are different types of pointers?