answersLogoWhite

0

Such loops are usually referred to as "null" or "empty" loops.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Can modules be called from a statements in the body of any loop?

true


How do you use a C-continue statement in a block- without any looping or conditional statements?

In the C language, the continue statement can only be used within a loop (for, while, or do). Upon execution, control transfers to the beginning of the loop.


Why functions use in c language?

Because you have to: any executable statement in C must belong to one function or another; there mustn't be executable statements outside of functions.and it also reduces the length of the program


What are non-executable statement in a program javascript?

Comments are non-executable statements within JavaScript (or any other programming.) In JavaScript, comments are surrounded by /* and */ for multi-line comments, or started with // for single line comments.


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.


Which command is used to skip the rest of a loop and carry on from the top of the loop again?

From inside any loop statement, the continue; statement will skip any remaining statements and re-evaluate the loop's conditional expression. If that expression remains true, a new iteration of the loop begins, otherwise control passes to the statement that follows the loop. Note that in a for or while loop, the conditional expression is defined before the loop body but in a do loop it is defined after the loop body.


Difference between break function and continue function?

The 'break' command will stop a loop from going any further, where a 'continue' command will start the loop over at the top (or bottom) of the loop, bypassing other instructions that may be in the loop. The 'continue' command will not stop a loop, but a 'break ' command will.Note: these statements aren't commands or functions.


How does a WHILE loop work in GML?

The while loop works as follows:{while( [expression is true] ) {//Do this code}}The while loop re-runs until the expression contained within the parentheses is false. Take a look at this example:{while(!place_meeting(x,y,obj_ground)) {y += 1;}}This while loop tells the object to move down one pixel until it collides with obj_ground. Unfortunately, nothing guarantees that this loop will not run forever. Always make sure that when you construct a while loop that you make sure that it does not run forever. Take a look at this whileloop:{while(obj_ball.y < y) {draw_sprite(sprite_index,0,x,y);}} This while loop will run for ever. Why? It does not have any statements that insure that the while loop aborts. Again, Always make sure that when you construct a loop that you put statements in the loop that will eventually abort the loop. y -= 1; is the statement in this new while loop that eventually aborts the loop:{while(obj_ball.y < y) {draw_sprite(sprite_index,0,x,y); y -= 1;}}


How can I create a seamless loop in After Effects?

To create a seamless loop in After Effects, you can duplicate your footage, offset the timing of the duplicate, and blend the two together using keyframe animation. This will create a continuous loop without any noticeable breaks or jumps.


A variable declared inside the for loop control cannot be referenced outside the loop?

Yes. A variable declared inside the loop is a local variable for the code block enclosed by the {} statements of the for loop. The variable will not be available to be used by any code outside the code block.


Why can't a goto statement be considered a looping structure?

A goto is an unconditional jump within the same procedure. Languages that do not support the notion of procedures (also known as subroutines or functions) are simply treated as being one large procedure. Regardless, the normal flow of execution within any one procedure is always from the top down, one statement after the other -- unless a goto is encountered. Goto statements allow the programmer to alter the flow of execution within a procedure. When a goto jumps backwards, this may result in statements that have already been executed to execute again. Every time that same goto is encountered, those same statements will execute over and over, thus creating a loop. However, a goto statement cannot be considered a loop because not all goto statements actually create loops. A goto statement that jumps forwards within a procedure rather than backwards cannot be considered a loop; it is bypassing code, not repeating it. By the same token, a goto statement that jumps backwards might begin executing a section of code that was previously bypassed by an earlier goto. So, without physically reading the code and following the flow of execution, there's simply no way to tell if a goto is a creating a loop or not. When a programming language supports structured looping statements, including for, for-each, while, do-while and repeat, then it becomes crystal clear that a loop really is being executed. While programmers can obviously use goto statements to create loops, there is no benefit in doing so. After all, code that is easy to read is also easy to maintain. If you want a loop, be specific and use the the appropriate loop structure. Although you should avoid using goto statements to create loop, that doesn't mean to say goto statements should be avoided altogether. For instance, when you have a nested loop (a loop within a loop) where you wish to break out of the outer loop from within the inner loop, a goto statement is by far the most efficient means of achieving that. Also keep in mind that in most cases a goto statement will be used in conjunction with an if statement which will decide whether the goto statement should be invoked or not, or perhaps to decide between two different goto statements. A switch structure extends this notion to cater for two or more goto statements, each of which is handled by a case label, thus giving greater structure and control over jumps.


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