You are on page 1of 1

#include "stdafx.h" #include <stdio.

h> #include <string> int main() { char str[10],temp; int i,len; printf("Enter String : "); scanf("%s",str); len=strlen(str)-1; for(i=0;i<strlen(str)/2;i++) { temp=str[i]; str[i]=str[len]; str[len--]=temp; } printf("%s",str); system("pause"); return 0; }

You might also like