Question: 2. Solve a puzzle. Consider the following C program, with two variable values redacted. Note that the short int type is 16 bits (2 bytes)

 2. Solve a puzzle. Consider the following C program, with twovariable values redacted. Note that the short int type is 16 bits

2. Solve a puzzle. Consider the following C program, with two variable values redacted. Note that the short int type is 16 bits (2 bytes) wide, and the output statements all use (unsigned) decimal, not hex. #include int main() { unsigned short int s = /* ??? */; unsigned short int t = /* ??? */; printf("S >> 8 = %u ", s >> 8); printf("s & Oxff = %u ", s & Oxff ); printf("s^ t = %u ", s^t ); return 0; Given (below) the output of this program, can you deduce the values of the variables s and t? You may have to convert the unsigned integer values to hexadecimal or binary. S >> 8 = 128 s & Oxff = 15 S^ t = 36863

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!