EC-Council
312-92 · Question #45
What type of problem will result if the following statement is used? int main() { short int a; unsigned short int=b32768; a=b; printf( " a = %d", a); b=65535; a=b; printf( " a = %d", a); }
The correct answer is A. Truncation. See the full explanation below for the reasoning.
Question
What type of problem will result if the following statement is used? int main() { short int a; unsigned short int=b32768; a=b; printf( " a = %d", a); b=65535; a=b; printf( " a = %d", a); }
Options
- ATruncation
- BPointer subterfuge
- CSign error
- DFunction-pointer clobbering
How the community answered
(45 responses)- A73% (33)
- B4% (2)
- C7% (3)
- D16% (7)
Community Discussion
No community discussion yet for this question.