Register
 

Free CSC Scholarship support for 2018-19

Engineering, Computer, Scholarship and SEO Support Forum



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

Offline mechanic

  • Engineer
  • Hero Engineer
  • *****
  • Posts: 3029
    • View Profile
    • Engineering Forum
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, Computer, Scholarship and SEO Support Forum

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