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 pass by reference in functions?
What is hashing in c language?
Explain what math functions are available for integers? For floating point?
Why is c called c not d or e?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
Explain how are 16- and 32-bit numbers stored?
What is the difference between malloc() and calloc()?
What are the uses of a pointer?
How is a pointer variable declared?
What is "Hungarian Notation"?
How pointer is different from array?
Tell me when would you use a pointer to a function?
What is static volatile in c?
Do you have any idea about the use of "auto" keyword?
Write a program with dynamically allocation of variable.