Re: string operation??



in 707477 20061127 112944 "santosh" <santosh.k83@xxxxxxxxx> wrote:
sethukr@xxxxxxxxx wrote:
hi everybody,

char str[10]="string";
str[0]^=str[1];

can anybody plz tell me the use of ^operator in string???

Please avoid abbreviations like plz instead of please, since this is an
international forum and many posters may not know it's meaning.

The bit pattern of the char value at str[1] is taken and an exclusive
OR operation is done with the bit pattern of the char value at str[0]
and the result in stored back to str[0].

The ^= is a compound assignment operator.

Which would be clearer with spaces either side of the operator
(especially to a Pascal programmer).
.



Relevant Pages

  • Re: string operation??
    ... Please avoid abbreviations like plz instead of please, ... international forum and many posters may not know it's meaning. ... The bit pattern of the char value at stris taken and an exclusive ...
    (comp.lang.c)
  • Re: string operation??
    ... Please avoid abbreviations like plz instead of please, ... international forum and many posters may not know it's meaning. ... The bit pattern of the char value at stris taken and an exclusive ...
    (comp.lang.c)
  • search text
    ... Plz. ... I am new to perl ... I want to accept a pattern from screen ... Do you Yahoo!? ...
    (perl.beginners)
  • Re: VB 6.0
    ... how to capture the whole path of the selected file into a string.Also, ... i need to use that string in form B.so how to retain the value of that ... how to print a stringchar by char. ... plz reply....... ...
    (microsoft.public.dotnet.languages.vb)
  • VB 6.0
    ... how to capture the whole path of the selected file into a string.Also, ... i need to use that string in form B.so how to retain the value of that ... how to print a stringchar by char. ... plz reply....... ...
    (microsoft.public.dotnet.languages.vb)