#include <stdio.h> #include <string.h> #include <stdlib.h> /* Program - Reverse given string with poniters Author - Surendra Patil */ int main() { char *str,*rev,*ptr,temp; str = (char *)malloc(10*sizeof(char)); printf("Enter the string \n"); scanf("%s",str); printf("String before reversing = %s len = %d \n",str,strlen(str)); ptr = str /* point to first character */; rev = ptr + (strlen(ptr)-1); /* point to last character */ /* keep swappi...
Happy learning.