write a program to display reverse of a number using for
loop?
Answer Posted / vishnu
int main()
{
int num;
int i;
int a[10];
printf("enter the number \n");
scanf("%d",&num);
for(i =0;num;i++)
{
a[i]=num %10;
num= num/10;
printf("%d",a[i]);
}
getch();
}
| Is This Answer Correct ? | 29 Yes | 21 No |
Post New Answer View All Answers
What is dynamic dispatch in c++?
Does c have function or method?
Differentiate between Macro and ordinary definition.
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
Is javascript written in c?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
Explain what are compound statements?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
Explain how do you list files in a directory?
What are integer variable, floating-point variable and character variable?
Tell me can the size of an array be declared at runtime?
Explain b+ tree?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
What will the preprocessor do for a program?
What is the purpose of 'register' keyword in c language?