Question: Assume data type int is 32 bits long and uses a twos-complement representation for signed values. Right shifts are performed arithmetically for signed values and
Assume data type int is 32 bits long and uses a two’s-complement representation for signed values. Right shifts are performed arithmetically for signed values and logically for unsigned values. The variables are declared and initialized as follows:

For each of the following C expressions, either
(1) Argue that it is true (evaluates to 1) for all values of x and y, or
(2) Give values of x and y for which it is false (evaluates to 0):

int x = foo(); /* Arbitrary value */ int y = bar(); /* Arbitrary value *
Step by Step Solution
3.44 Rating (173 Votes )
There are 3 Steps involved in it
These C puzzle problems provide a clear demonstration that programmers ... View full answer
Get step-by-step solutions from verified subject matter experts
