Author Topic: The following program main{} { int i = 5;  (Read 756 times)

Offline mechanic

The following program main{} { int i = 5;
« on: April 30, 2017, 01:08:39 PM »
Advertisement
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

Engineering Forum

The following program main{} { int i = 5;
« on: April 30, 2017, 01:08:39 PM »