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

Offline mechanic

  • Engineer
  • Hero Engineer
  • *****
  • Posts: 2275
    • 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 Forum

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


 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
2+3: