The following program main{} { int i = 5;

  • 0 replies
  • 671 views
*

Offline mechanic

  • *****
  • 2566
    • View Profile
    • Engineering Forum
The following program main{} { int i = 5;
« on: April 30, 2017, 01:08:39 PM »
Question: The following program

main{} { int i = 5;
if {i == 5} return;
else printf{"i is not five"};
printf{"over"};
}

results in

Options are:

A. a syntax error
B. an execution error
C. printing of over
D. execution termination, without printing anything

Correct answer is:

D. execution termination, without printing anything