write a program to display reverse of a number using for
loop?
Answer Posted / ganagdhara c
#include<stdio.h>
#include<conio.h>
void main()
{
long int num,i;
int d;
clrscr();
printf("\n enter number");
scanf("%ld",&num);
printf("\n the reverse of number %ld is ",num);
for(i=0;num>0;i++)
{
d=num%10;
num=num/10;
printf("%d",d);
}
getch();
}
Is This Answer Correct ? | 22 Yes | 17 No |
Post New Answer View All Answers
What is p in text message?
What does return 1 means in c?
what do you mean by enumeration constant?
What is a built-in function in C?
Is it acceptable to declare/define a variable in a c header?
What does double pointer mean in c?
What are the types of operators in c?
Explain high-order bytes.
What is the concatenation operator?
What is the purpose of sprintf() function?
What is linear search?
Why clrscr is used after variable declaration?
Describe dynamic data structure in c programming language?
What is c value paradox explain?
Why is c called c not d or e?