Blog Moved

This website completely moved to new domain. For latest content, visit

Search This Blog

9 Aug 2012

C Program To Find The Reverse Of a Given Number

/** To Find Reverse Of a Number **/
void main()
    int num,rem,sum=0,rev;
    printf("\n /** To Find Reverse Of a Number **/ \n");
    printf("\n Enter a number: ");
         rem=num%10;  //for getting remainder by dividing with 10
         num=num/10; //for getting quotient by dividing with 10
    printf("\n The Reversed Number is: %d \n\n",rev);
    return 0;

Output: ( using GNU GCC Compiler with code::blocks IDE, hence no need of clrscr(); and getch(); )

No comments:

Post a Comment