Pages
Home
VijayNetwork
C Programming Q&A
Saturday, January 14, 2012
String Reverse
int main( void )
{
char S[] = "iVijay 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;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment