The following program fragment int i = 107, x = 5; results in?

  • 0 replies
  • 385 views
*

Offline mechanic

  • *****
  • 2513
    • View Profile
    • Engineering Forum
The following program fragment int i = 107, x = 5; results in?
« on: September 06, 2017, 11:03:14 AM »
Question: The following program fragment

int i = 107, x = 5;
printf((x > 7)? "%f" : "%c" , i);

Results in?

Options are:

A. an execution error
B. a syntax error
C. Printing of k
D. None of the above

Correct answer is:

C. printing of K