Register
 

Free CSC Scholarship support for 2018-19

Engineering, Computer, Scholarship and SEO Support Forum



Author Topic: If abc, is the input, then the following program fragment char x, y, z;  (Read 408 times)

Offline mechanic

  • Engineer
  • Hero Engineer
  • *****
  • Posts: 3012
    • View Profile
    • Engineering Forum
Advertisement
Question: If abc, is the input, then the following program fragment

char x, y, z;
printf{"&d", scanf ("%c%c%c", &x, &y, &z)}; results in

Options are:

A. a syntax error
B. a fatal error
C. segmentation violation
D. printing of 3

Correct answer is:

D. printing of 3


Engineering, Computer, Scholarship and SEO Support Forum