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

  • 0 replies
  • 324 views
*

Offline mechanic

  • *****
  • 2473
    • 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

 

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.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

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+2: