- A 10 4294967286 0 0
- B 10 65526 0 0
- C A and B
- D None
- Share this MCQ
Answer:
C
Share this MCQ
Output of Turbo C++ 3.0: 10 65526 0 0
10 65526 0 0
Turbo C ++4.5: 10 65526 0 0
10 65526 0 0
Linux GCC: 10 4294967286 0 0
10 4294967286 0 0
Visual C++: 10 4294967286 0 0
10 4294967286 0 0
a=(signed)10u;
signed value of 10u is +10
so, a=10
b=(unsigned)-10;
unsigned value of -10 is :
MAX_VALUE_OF_UNSIGNED_INT – 10 + 1
In turbo c 3.0 complier max value of unsigned int is 65535
So, b = 65526
y = (signed)10u + (unsigned)-10;
= 10 + 65526 = 65536 = 0 (Since 65536 is beyond the range of unsigned int. zero is its corresponding cyclic vlaue)
X = y = 0
Click me to Read more Question & Answer of Data Types in C LanguageShare this MCQ