Bismillahir Rahmanir Rahim
Solution: In C program:------
#include <stdio.h> #include <string.h> void main() { char str[30]; printf("Enter a string to reverse:\n"); gets(str); strrev(str); printf("Reverse of entered string is:\n%s",str); }Solution:In C++ program:----
#include <iostream.h> #include <string.h> void main() { char str[30]; cout<<"Enter a string to reverse:"<<endl; cin.getline(str,30); strrev(str); cout<<"Reverse of entered string is:"<<endl<<str; }