Any program in C or C++ language may consist of a number of statements which are further executed in sequence. But the program became more powerful if we can control the order in which the statement run. The normal flow of execution of any high level language program is in sequential order i.e statements are executed according to the appearance in the program. But in some cases of a problem statements, it might be possible that the change in the normal execution of the program. The statements which specify the order of execution of statements are called control flow statements.

There are different categories of C++ Statements:

1. Compound statements: Compound statements are the group of statements in which each individual statement ends with a semi-colon (;). The group of statement are called block. Theses statement are grouped in ({ })braces. The opening braces ({ ) denotes the beginning of the block and closing braces (}) denotes the end of block.


2. Null Statements: When we write only a semicolon it represents a null statement. So " ;"  is a null or empty statement. These statement are generally used in " for and while looping statements". 
3. Conditional Statements: When we want to execute a program on base of some particular condition is known as conditional statement. There are three types of conditional statement like " if " ," if-else" , " nested if" statements. In conditional statement the condition is checked first and then block of that condition is executed.

4. Switch statements: C++ has a built-in multiple-branch selection statement, called switch statement which successively tests the value of  an expression against a list of integer or character constant.

5. Iterative Statements: Iterative Statement are those statements which are use to run a particular block of statements repeatedly or in other words from a loop. There are three types of looping statements like for, while, do-while loop. Every loop statements need a counter variable to count the number of iteration and must be initialized with some initial value. There must be a termination condition of loop variable.  

6. Jumping Statements: A C++ jump statement performs an immediate local transfer of control. We can move from one statement directly to last or first statement with the help of jump statement. There are three jump statements like goto, break and continue.


Thanks
Mukesh Rajput
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

1 comments: