nerdexam
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)
  • A
    73% (33)
  • B
    4% (2)
  • C
    7% (3)
  • D
    16% (7)

Community Discussion

No community discussion yet for this question.

Full 312-92 Practice