/* NAME: VARUN AGGARWAL ROLL NO: 1 SEM-1 ICA SUBJECT: FOP DEFINITION: */ #include <conio.h> #include <stdio.h> long int rev(long int);
DIV: A
int main() { long int n,x; clrscr(); printf("\nEnter the value of n :"); scanf("%ld",&n); printf("Original number : %ld",n); x=rev(n); printf("\nReverse number : %ld",x); getch(); return 0; } long int rev(long int n) { long int s2=0; int p; while(n>0) { p=n%10; s2=(s2*10)+p; n=n/10; } return s2; } /* */ OUTPUT: