Re: string operation??
- From: "santosh" <santosh.k83@xxxxxxxxx>
- Date: 27 Nov 2006 04:15:36 -0800
Bob Martin wrote:
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).
Yes, it seems popular among many newbies to eschew whitespace, and C
seems particularly prone to this trend!
.
- References:
- string operation??
- From: sethukr@xxxxxxxxx
- Re: string operation??
- From: santosh
- Re: string operation??
- From: Bob Martin
- string operation??
- Prev by Date: Re: Writing an int to a file, not quite sure how buffers work.
- Next by Date: Re: Writing an int to a file, not quite sure how buffers work.
- Previous by thread: Re: string operation??
- Next by thread: Re: string operation??
- Index(es):
Relevant Pages
|
|