Author Topic: The following program fragment int i = 107, x = 5; results in?  (Read 511 times)

Offline mechanic

The following program fragment int i = 107, x = 5; results in?
« on: September 06, 2017, 11:03:14 AM »
Advertisement
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

Engineering Forum

The following program fragment int i = 107, x = 5; results in?
« on: September 06, 2017, 11:03:14 AM »