C KEYWORDS – A BRIEF DESCRIPTION

C KEYWORDS - The 32 keywords in C Language

6. CONTINUE KEYWORD :

continue is one of the C keywords which we use in continue statement. We use this keyword when there is a need to go to the next iteration of the loop. Also, after skipping some statements of the loop.

Furthermore, we use continue keyword generally with a condition. After using the continue keyword, the control passes to the next iteration leaving some statements unexecuted.

Likewise break keyword, there’s no specific syntax for continue keyword. Certainly, it is written as,

continue;

Continue statement Flowchart - C KEYWORDS
https://www.programiz.com

Given above is the flowchart of continue statement.

 

7. DEFAULT KEYWORD

Likewise case keyword, default is also one of the C keywords which we use in switch statement.

Generally, in a switch statement the choices are made according to the number of case constants. If the value of the expression matches with any case constant, then the compiler executes the particular case. Otherwise, the compiler executes the block of statements which falls under default.

default” is always optional. If it is not present and no case matches then no action takes place. Generally, we can place case and default keyword in switch statement in any order.

SYNTAX :

default :

statement

   ……….. … .. .

Here, default keyword will come into action when the value of expression will not match with any case constant. Hence, the compiler will execute the statements in the default.

 

8. DO KEYWORD

do is one of the C keywords which we use in do…while loop. Generally, we use it in the looping concept.

do is the keyword which when we use in the do…while loop contains a number of statements that executes atleast one or more than one time.

SYNTAX :

do

   {

       statement ;

         ……… …. .. 

   } while(condition);

Here, the compiler executes the statements in the do loop without testing any condition. That means the statements executes atleast one or more time.

Leave a comment

Your email address will not be published. Required fields are marked *

15 thoughts on “C KEYWORDS – A BRIEF DESCRIPTION”