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
What is #define used for in c?
What do you mean by a local block?
What is a stream water?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What is the difference between call by value and call by reference in c?
what is the diffrenet bettwen HTTP and internet protocol
How can I swap two values without using a temporary?
Where can I get an ansi-compatible lint?
When should structures be passed by values or by references?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What are the three constants used in c?
What is wild pointer in c?
Why isnt any of this standardized in c?
Explain modulus operator.