answersLogoWhite

0

That statement is definitely TRUE. This is the major concern with using while loops and why you need to be very careful using them. A false statement inside the loop would cause its immediate termination. That is desired in all cases.

User Avatar

Wiki User

11y ago

What else can I help you with?

Continue Learning about Engineering

What is the if statement that appears inside another if statement?

nested if Statement


Explain Selection control statements and Iteration statements in C plus plus?

Selection control statements in C++There are basically two types of control statements in c++ which allows the programmer to modify the regular sequential execution of statements.They are selection and iteration statements. The selection statements allow to choose a set of statements for execution depending on a condition. If statement and switch statement are two statements which allow selection in c++. There is also an operator known as conditional operator which enables selection.If statementSyntax : if (expression or condition){ statement 1;statement 2;}else{ statement 3;statement 4;}The expression or condition is any expression built using relational operators which either yields true or false condition. If no relational operators are used for comparison, then the expression will be evaluated and zero is taken as false and non zero value is taken as true. If the condition is true, statement1 and statement2 is executed otherwise statement 3 and statement 4 is executed. Else part in the if statement is optional. If there is no else part, then the next statement after the if statement is exceuted, if the condition is false. If there is only one statement to be executed in the if part or in the else part, braces can be omitted.Following example program implements the ifstatement.// evenodd.cpp# include # include void main(){int num;cout


Why is the if statement useful?

if statements allows for human-readable, logical branches in code. While usually not the only control statements in programming languages, they provide both a simple and a powerful method to allow code to divert off of a preset path.


What is a select case statement used for in programming?

In programming, select case statement is a way to test the inside of a variable. It is used when one knows there is a limited number of things that can be in the variable.


Why you use for loop inside switch statement?

Because you have to repeat something. (Or you can use while-loop, too.)

Related Questions

What is if statement in c language?

first i would like to tell about if . if is keyword in c language . if is check the condition(expression) .if the expression is non zero value the condition is true .it will the go through the fallowing operations .other wise the condition is failed. if(expression) { } if the expression is >0 ,<0 these statements are execute inside the if statement. if the expression is =0 condition is failed.


How can you define null statement in loop in C programming?

If you are using for loop for(;;); or you can also define condition and iterations but the loop has to close there itself without any statement inside it. In the similar way you can define while and do while loop without any statement.


What is the if statement that appears inside another if statement?

nested if Statement


What is the electric field inside an infinitely long cylindrical conductor with radius r and uniform surface charge density?

The electric field inside an infinitely long cylindrical conductor with radius r and uniform surface charge density is zero.


What is inside the Black Hole?

At the center of a black hole is a mass that has collapsed to an infinitely dense point.


What is the definition of nested IF statement?

I believe it would be an if statement INSIDE of another if statement. So, ex. if one condition is TRUE, then the 2nd if statement is executed. could look like: if (colour ==red) if (leaf == maple) cout<< "OMG CANADA!"; else cout<< "Fail."; get it? of course, it can be beneficial sometimes beyond situations where you can simply use the && or operators as well.. but i have PDENG. hope that helps


Conditional statement inside a conditional loop?

int i = 100; while(i > 0) { // Conditional loop --i; if((i % 2) == 0) { // Conditional statement inside a conditional loop System.out.println(i + " is even."); } }


Explain Selection control statements and Iteration statements in C plus plus?

Selection control statements in C++There are basically two types of control statements in c++ which allows the programmer to modify the regular sequential execution of statements.They are selection and iteration statements. The selection statements allow to choose a set of statements for execution depending on a condition. If statement and switch statement are two statements which allow selection in c++. There is also an operator known as conditional operator which enables selection.If statementSyntax : if (expression or condition){ statement 1;statement 2;}else{ statement 3;statement 4;}The expression or condition is any expression built using relational operators which either yields true or false condition. If no relational operators are used for comparison, then the expression will be evaluated and zero is taken as false and non zero value is taken as true. If the condition is true, statement1 and statement2 is executed otherwise statement 3 and statement 4 is executed. Else part in the if statement is optional. If there is no else part, then the next statement after the if statement is exceuted, if the condition is false. If there is only one statement to be executed in the if part or in the else part, braces can be omitted.Following example program implements the ifstatement.// evenodd.cpp# include # include void main(){int num;cout


How do you use continue statement in c language?

In C continue stements are used inside the loops like for .while,do while .its a statement used in c language wher it tell the compiler to skip the following statement(statement or part of progm following continue)&continue with next iteration.it shud me noted that its diff from break statement wher the control of prog goes out of the particular loop.in case of for ,while ,or do loops when we use continue the rest of the loop will not me excecuted and it will go back to check the condition of the loop.


The room inside the tower of the lady of shalott?

this isn't a question its a statement with an ? on the end


What is a parenthetical statement?

A parenthetical statement is one that takes place inside a pair of parentheses. They are generally used as an aside to the actual sentence or paragraph.


Why is the if statement useful?

if statements allows for human-readable, logical branches in code. While usually not the only control statements in programming languages, they provide both a simple and a powerful method to allow code to divert off of a preset path.