Answer :

#include<stdio.h>

#include<string.h>

int main ()

{

int c;

int num,num1,n=0;

char a[100];

printf("Select the content form\n1.Number\n2.Text\n");

scanf("%d",&c);

switch(c)

{

case 1 :

printf("Enter the number you want to reverse : ");

scanf("%d",&num);

while (num!=0)

{

num1=num%10;

n=n*10+num1;

num=num/10;

}

printf("The reverse number is : %d",n);

break;

case 2:

printf ("Enter the content : ");

scanf("%s",&a);

strrev(a);  //function of string

printf("The content return in reverse is %s",a);

break;

}

}

Output :