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


Please Help Members By Posting Answers For Below Questions

What is p in text message?

528


What does return 1 means in c?

577


what do you mean by enumeration constant?

588


What is a built-in function in C?

782


Is it acceptable to declare/define a variable in a c header?

675






What does double pointer mean in c?

567


What are the types of operators in c?

604


Explain high-order bytes.

668


What is the concatenation operator?

598


What is the purpose of sprintf() function?

589


What is linear search?

668


Why clrscr is used after variable declaration?

1031


Describe dynamic data structure in c programming language?

593


What is c value paradox explain?

563


Why is c called c not d or e?

600