Usually the loop is used for repeating the same task for more than one time.
If you don't give the terminating statement then the loop will go in infinite condition.
differance between control statement and looping statement?
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.
for,while,do while
while, for, do-while (and perhaps goto)
There are several 'looping' statements in C++. They are:while () { }do { } while () ;for (index-start, index-end; index increment/decrement) { }They are used to repetitively execute statements as long as the statement(s) controlling the loop are true.
There is no "elseif" statement in C. You can only use "else" and "if" separately. This is a good reason for switch/case/break.
Because that is the defined statement terminator of the language.
A loop in computer languages is a set of statements that execute repeatedly, based on some criteria.In C and C++, the three looping statements are while, do, and for...while (test-expression) statement;/* statement executes zero or more times, until test-expression is false, test first */do statement while (test-expression);/* statement executes one or more times, until test-expression is false, test last */for (init-expression, test-expression, loop-expression) statement;/* init-expression executed once, at beginning *//* statement executes zero or more times, until test-expression is false, test first *//* loop-expression evaluated at end of each iteration */Often, statement, is a set of statements, such as...while (test-expression) {... statements}
I believe, you can use C-function - printf().
Any experssion including assignment or a function call can be a statement in C
In C (and C++ and Java), the semicolon is used to mark the end of a statement. It is also used the separate the expressions in a for loop.
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.