Question: For this question, assume an int is stored in 8 bits and a short is stored in 4 bits. What would be displayed to the

For this question, assume an int is stored in 8 bits and a short is stored in 4 bits. What would be displayed to the screen by the printf in the following code fragment?

int i = -9; short s = (short) i; printf("%d ", s);

Question options:

1

-1

-7

7

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!