write a program to display reverse of a number using for
loop?

Answer Posted / rajesh.k

int main()
{
int num, i;
printf("Enter the number :\n");
scanf("%d",&num);
printf("The reverse number is :\n");
for(i = num;i >= 0; i--) {
printf("%d",i);
printf("\n");
}
getch();
}

Is This Answer Correct ?    20 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

666


What is far pointer in c?

821


Which type of language is c?

660


Write the syntax and purpose of a switch statement in C.

635


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

1582






Why can’t we compare structures?

826


What are the rules for the identifier?

685


a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

667


What is #define in c?

638


Why & is used in scanf in c?

635


Differentiate fundamental data types and derived data types in C.

625


Explain what are global variables and explain how do you declare them?

649


What do you mean by dynamic memory allocation in c?

658


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

1482


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2066