1/25
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Unless block statements are used, the body of a while loop can be a single C++ statement only?
True
End of File controlled loops can be used to read information from an input file of unknown length
True
The end of file status bit is changed from false to true when an attempt is made to read beyond the end of an input file?
True
Event controlled loops terminate(exit) when a specific event occurs causing the loop to be exited?
True
In a loop, event counters are incremented every time the loop body is executed.
False
A flag controlled loop continues to execute until the boolean flag has its starting value changed from true to false or false to true which causes the loop to exit.
True
For sentinel controlled loops, the best sentinel is a value that is not expected as normal input for the program?
True
A while loop continues to loop through the loop body as long as the while expression being tested is true?
True
Count controlled loops terminate(exit) when some event occurs in the body of the while loop?
False
In C++ it is a syntax error if a loop is declared inside the body of another loop? - (in other words it is illegal in c++ to nest loops)
False
Which of the following are types of Event Controlled Loops?
Flag Controlled, Sentinel Controlled, End Of File Controlled
Which of the following are functions that return the boolean status of a file stream status bit?
eof()
good()
fail()
In a switch statement there can be 0 or more statements associated with a Switch Label?
True
A continue statement will cause the immediate exit of the loop in which it appears?
False
In a switch statement, once control branches into the switch statement at a case label, control proceeds sequentially untll either a break statement or the end of the switch statement is encountered - whichever occurs first.
True
Break statements are optional in a switch statement?
True
A break statement causes the immediate exit from the loop or switch statement in which it appears?
True
In C++ programming, all loops should have a break statement in them?
False
In a switch statement, a variable can be used as a case label?
False
The default label is required in a switch statement?
False
In a switch statement, if the switch expression matches a case label, control branches to the statements associated with the default label?
False
The body of a do-while loop will execute 0 or more times?
False
A do-while loop ends with a semi-colon (;) after the while expression?
True
A break statement can be used in which of the following C++ control structures?
while loop
for loop
do-while loop
switch statement
Which of the following data types can be used as switch expressions?
Integer (int)
Boolean (bool)
Character (char)
A continue; statement can be used in which of the following C++ control structures?
while loop
for loop
do-while loop