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 ? | 30 Yes | 26 No |
Post New Answer View All Answers
Difference between constant pointer and pointer to a constant.
What is union in c?
What does node * mean?
What is a pointer on a pointer in c programming language?
What are the 4 types of programming language?
How can I read and write comma-delimited text?
What is the size of array float a(10)?
What is #define?
Explain what are the __date__ and __time__ preprocessor commands?
What is 1f in c?
Is null always equal to 0(zero)?
How can I implement a delay, or time a users response, with sub-second resolution?
When can a far pointer be used?
What is the best way of making my program efficient?
Can we change the value of #define in c?