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
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Is main is a keyword in c?
Why is c faster?
Can you tell me how to check whether a linked list is circular?
Explain what is the heap?
Is r written in c?
Explain what does the format %10.2 mean when included in a printf statement?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
which is an algorithm for sorting in a growing Lexicographic order
What are types of functions?
Why doesnt the call scanf work?
Difference between constant pointer and pointer to a constant.
What is a void pointer? When is a void pointer used?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
How are strings stored in c?