Re: [algogeeks] use of ^ in char[]

2011-08-23 Thread nagarajan
You are doing Bitwise XOR and getting values corresponding symbols of XOR -ed result.. On Tue, Aug 23, 2011 at 8:10 PM, shiva wrote: > #include > int main(){ >char str[]="abcd"; >int i; > >for(i=0;i<6;i++){ >str[i]^=str[6-i]; >} >printf("\n%s

[algogeeks] use of ^ in char[]

2011-08-23 Thread shiva
#include int main(){ char str[]="abcd"; int i; for(i=0;i<6;i++){ str[i]^=str[6-i]; } printf("\n%s",str); getch(); return 0; } i don understand how it works... can u explain if u guys understand..? -- You received this messa