Quote:

>What do the symbols: >> and << and also ^

>do?

in C++ (my version)

<< - "insertion" - It passes data into a stream. You can think of it as

calling the function over and over with the different parameters from

left to right. i.e. you could think of cout << "Apples " << "Oranges";

as being the same as (or very similar to) printf("Apples ");

printf("Oranges");

Quote:

>> - "Extraction" - The same as above, but instead of passing in a series

of parameters, you accept a series of return values. i.e. you could

think of cin >> ch1 >> ch2; as being the same as (or very similar to) ch1

= getchar(); ch2 = getchar();

in C/C++ (Techy version)

Bitwise-exclusive-OR Operator

Operator ^

The bitwise-exclusive-OR (^) operator compares each bit of its first

operand to the corresponding bit of its second operand. If one bit is

0 and the other bit is 1, the corresponding result bit is set to 1.

Otherwise, the corresponding result bit is set to 0.

Bitwise Shift Operators: Left Shift and Right Shift

Operator <<, >>

Syntax shift-expression :

additive-expression

shift-expression << additive-expression

shift-expression >> additive-expression

The shift operators shift their first operand left (<<) or right (>>) by

the number of positions the second operand specifies.

Both operands must be integral values. These operators perform the usual

arithmetic conversions; the type of the result is the type of

the left operand after conversion.

For leftward shifts, the vacated right bits are set to 0. For rightward

shifts, the vacated left bits are filled based on the type of the first

operand after conversion. If the type is unsigned, they are set to 0.

Otherwise, they are filled with copies of the sign bit.

The result of a shift operation is undefined if the second operand is

negative, or if the right operand is greater than or equal to the width

in bits of the promoted left operand.

Quote:

>--

>_____________________________________________________________________

> Civil and Environmental Engineering, University of Michigan

>_____________________________________________________________________