Like us on Facebook

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

Offline mechanic

  • Engineer
  • Hero Engineer
  • *****
  • Posts: 2253
    • View Profile
    • Engineering Forum
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 »


 

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:
type: "Pakistan" without quotes: