explain the continue statement - computer


Explain the Continue statement - Computer Programming?

This is alike to break but is encountered less frequently. It merely works within loops where its effect is to force an immediate jump to the loop control statement.

    In a while loop, jump to the test statement.

    In a do while loop, jump to the test statement.

    In a for loop, jump to the test, and perform the iteration.

The continue statement make the current iteration of a loop to stop and make the next iteration of the loop to begin immediately Like a break, continue should be protected by an if statement. It is wriiten simply as

continue;

The following code progression all characters except digits:

            for(j=0;j
            {

                        c=getchar();

                        if(( c > '0' )&&(c<='9'))

                                    continue; /* continue transfers control to begin next iteration */

                        .................................

                        .................................

            }

continue transfer the control to the beginning of the next iteration whereas break terminate the loop.

Request for Solution File

Ask an Expert for Answer!!
Application Programming: explain the continue statement - computer
Reference No:- TGS0304265

Expected delivery within 24 Hours