write a program to display reverse of a number using for
loop?
Answer Posted / k.ashok kumar
BETTER CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("\n Enter a number : ");
scanf("%d",&a);
printf("\n Reverse number of %d is : ",a);
while(a)
{
printf("%d",a%10);
a/=10;
}
getch();
}
Is This Answer Correct ? | 6 Yes | 8 No |
Post New Answer View All Answers
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
Is using exit() the same as using return?
What is static and auto variables in c?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
How can I split up a string into whitespace-separated fields?
What is union and structure in c?
What is volatile variable in c with example?
what is the difference between class and unio?
in linking some of os executables are linking name some of them
What is #include stdlib h?
What is the difference between typedef struct and struct?
How are variables declared in c?
What do you know about the use of bit field?
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
What does s c mean in text?