Search This Blog

If you like any posts in this blog then click this icon which is present under the post

Thursday 11 August 2011

Continue statement - skipping a part of a loop


               Continue statement is used to skip a part in the body of the loop. When this statement is used inside a loop it skips the execution of the remaining statements in the body of the loop after the keyword continue and continue with the next iteration.

The general form is

continue;

                When this statement is used inside a for loop the control is transferred to the beginning of the loop. If it is used inside while or do loops the control is transferred to the test condition.

No comments:

Post a Comment

Followers