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
How to delete a node from linked list w/o using collectons?
Explain the red-black trees?
What is the meaning of ?
What is the difference between the local variable and global variable in c?
Write a program to check whether a number is prime or not using c?
Explain what are the standard predefined macros?
What are enumerated types?
What is the size of structure in c?
If null and 0 are equivalent as null pointer constants, which should I use?
What does dm mean sexually?
What is data type long in c?
Explain what is the benefit of using enum to declare a constant?
Can you return null in c?
What is function prototype in c language?
What is FIFO?