#include<stdio.h> main() { int i,j,k,l; char *p,*q,str[50]; printf("Enter a string"); p=str; gets(str); j=strlen(str); printf("Reverse of the string is "); for(i=j;i>=0;i--) { printf("%c",*(p+i)); } }
Output: [Click to enlarge]:
All in one blogging website