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
Explain a file operation in C with an example.
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
When we use void main and int main?
What is the difference between far and near ?
How do you define CONSTANT in C?
When should a type cast be used?
What is the difference between procedural and declarative language?
What is define directive?
How can I do serial ("comm") port I/O?
What are multidimensional arrays?
When is a void pointer used?
What does %c mean in c?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
How to compare array with pointer in c?
What is identifier in c?