meow00:

> How do I calculate these :

> int z = x & y ;

> int w = x && y ;

> if x and y are both integers, how do I calculate z and w ?

"&" is a bit-wise operator. Here is a description of how it works:

http://www.codeproject.com/cpp/bitbashing.asp

"&&" is a logical "and" operator. Basically it works like this:

A && B = X

If A is true (not 0) AND B is true, then X will be True (1).

If either A or B is not true (equal to 0), then X will be False.

Hope that helps,

Dex*

> How do I calculate these :

> int z = x & y ;

> int w = x && y ;

> if x and y are both integers, how do I calculate z and w ?

"&" is a bit-wise operator. Here is a description of how it works:

http://www.codeproject.com/cpp/bitbashing.asp

"&&" is a logical "and" operator. Basically it works like this:

A && B = X

If A is true (not 0) AND B is true, then X will be True (1).

If either A or B is not true (equal to 0), then X will be False.

Hope that helps,

Dex*