Program for String Reverse
int main(void)
{
char S[] = "Vijay C Programming";
int i, j;
for( i=0, j=strlen(S)-1; i<((strlen(S))/2); ++i, --j )
{
S[i] ^= S[j] ^= S[i] ^= S[j];
}
printf( "Reverse Is : %s\n", S );
return 0;
}
Comments