answersLogoWhite

0


Best Answer

The do-while loop is designed specifically for such situations, where you want the loop to execute once irrespective of the loop expression.

The loop would execute once and then terminate because, the loop controlling expression is false.

If you note the syntax properly

do {

...

...

...

} while(condition)

The condition is executed only after one iteration of the loop and hence the code would execute once irrespective of the loop expression result.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What happens if the controlling expression in a do while loop is initially false?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What expression has a value of either true or false?

In C, any non-zero expression is true and any zero expression is false.


Define an expression that evaluates to true when i equals j?

In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.


You use the operator to reverse the meaning of a Boolean expression?

The NOT operator. E.g., NOT TRUE evaluates to FALSE while NOT FALSE evaluates to TRUE.


What loop should no execute if the test expression is false to begin with?

for loop and while loop need the expression to be true for further execution of the program.


Definition and comments for loop?

The C and C++ for loop is defined as...for (init-expression; test-expression; loop-expression) loop-statement;The init-expression is executed once.At the top of the loop, test-expression is evaluated. If it is false, control passes to the statement following loop-statement.The loop-statement is executed. It may be one statement, it may be a block of statements, or it may be no statement. If it is no statement, the semi-colon is required.At the bottom of the loop, loop-expression is executed, and then control passes to the test-expression at the top of the loop for another go-around.Each of init-expression, test-expression, and loop-expression may be missing. The semi-colons are required. The formal "forever" loop is for (;;) loop-statement; in which case the only way out is the break statement.Since each of init-expression, test-expression, and loop-expression can have side-effects, sometimes a loop is constructed with no loop-statement, and all processing is done between the parentheses.If test-expression is initially false, loop-expression and loop-statement are never executed. The init-expression is always executed only one time, and test-expression is executed at least one time.At any point during loop-statement, the breakstatement will exit to the statement following loop-statement, and the continue statement will jump to the loop-expression at the bottom of the loop.

Related questions

What expression has a value of either true or false?

In C, any non-zero expression is true and any zero expression is false.


True or false the controlling expression of a switch statement must have a value that is an integer or a character?

False. In C++, it must evaluate to an integral type, which includes floating point types. In other languages, a character array or other object may also be acceptable.


What is an expression evaluates as either true or false?

Boolean expression


True or False the movie Speed was not successful at the box office initially?

False


In evaluating a logical expression of type Boolean expression1 Boolean expression2 Both the Boolean expressions are not always evaluated True False?

FALSE.... cuz in && operator the compiler chk both of the expression if any of the expression is false then answer will be false.. for true result both of d expression must be true... by warrior2pnk


What is any value or expression that can be evaluated as being true or false?

A logical test is any value or expression that can be evaluated as being true or false.


What are the answers of CONTROLLING deathwatch beetles reading answers?

F B D A False False False Not Given True C D B


Did Gregor Mendel find that the dominant trait prevents the expression of the recessive trait?

False..............


May Requester not appeal when their request for information is initially denied?

false


May Requesters appeal when their request for information is initially denied?

false


What happens to the urea in a nephron?

False.


How can an expression be true or false?

It is always true because we don't know what the answer is so the expression could be anything