Exam 3: More Flow of Control

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Which of the following boolean expressions tests to see if x is between 2 and 15 including 2 and 15)?

Free
(Multiple Choice)
4.8/5
(29)
Correct Answer:
Verified

C

Given the following enumerated data type definition,what is the value of SAT? Enum myType{SUN=3,MON=1,TUE=3,WED,THUR,FRI,SAT,NumDays};

Free
(Multiple Choice)
4.8/5
(41)
Correct Answer:
Verified

A

Which of the following is not a good reason for choosing a certain loop control?

Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
Verified

D

The break statement causes all loops to exit.

(True/False)
4.8/5
(44)

If you need to write a do-while loop that will ask the user to enter a number between 2 and 5 inclusive,and will keep asking until the user enters a correct number,what is the loop condition?

(Multiple Choice)
4.8/5
(47)

A switch statement variable must be ________

(Short Answer)
4.9/5
(38)

if x is 0,what is the value of !x ==0)?

(Multiple Choice)
4.8/5
(35)

How many times is "Hi" printed to the screen Forint i=0;i<14;i++); Cout <<"Hi\n";

(Multiple Choice)
4.8/5
(47)

A ____________ expression is an expression that can be thought of as being true or false.

(Short Answer)
4.8/5
(39)

If a programming language does not use short-circuit evaluation,what is the output of the following code fragment if the value of myInt is 0? Int other=3,myInt; IfmyInt !=0 && other % myInt !=0) Cout << "other is odd\n"; Else Cout << "other is even\n";

(Multiple Choice)
4.8/5
(36)

A _________ loop always executes the loop body at least once,irregardless of the loop condition.

(Short Answer)
4.7/5
(37)

It is illegal to make function calls inside a switch statement.

(True/False)
4.9/5
(43)

A function may return a boolean value.

(True/False)
4.8/5
(37)

Given the following code,what is the final value of i? Int i; Fori=0; i<=4;i++) { Cout << i << endl; }

(Multiple Choice)
4.9/5
(35)

Given the following code,what is the final value of i? Int i,j; Fori=0;i<4;i++) { Forj=0;j<3;j++) { Ifi==2) Break; } }

(Multiple Choice)
4.9/5
(34)

What is the output of the following code fragment? Int x=0; { Int x=13; Cout << x <<","; } Cout << x << endl;

(Multiple Choice)
4.9/5
(31)

Which boolean operation is described by the following table? Which boolean operation is described by the following table?

(Multiple Choice)
4.9/5
(33)

A break statement in a switch stops your program.

(True/False)
4.8/5
(44)

Which of the following are equivalent to !x<15 && y>=3))?

(Multiple Choice)
4.9/5
(38)

What is wrong with the following for loop? Forint i=0;i<10;i--) { Cout << "Hello\n"; }

(Multiple Choice)
4.9/5
(34)
Showing 1 - 20 of 44
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)