Question
- Given: int a = 135; When examining the four consecutive bytes of memory in increasing order starting at &a, we find the following: 10000111
- Given: int a = 135;
When examining the four consecutive bytes of memory in increasing order starting at &a,
we find the following: 10000111 00000000 00000000 00000000
A. This is likely to be a little endian machine.
B. If reading only the first byte, this could be a negative 1-byte integer.
C. The consecutive bytes could represent a floating point number.
D. Both A and C above are correct.
E. All of the above are correct.
- When casting the int a from part (a) above to a char (which is a single byte), what value will we get?
A. 135
B. 0
C. a negative value
D. undefined value
E. None of these
I will really appreciate if you can explain why.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started