C++ Statements

Control statement :- Control statements define the direction or flow in which execution of a program should take place.

We have four types of control structures  statements :

  • Conditional(if-else)
  • Multidirectional(Switch Statement)
  • Loop Control

Type of Loop :-

  1. While Loop
  2. Do- while loop
  3. For Loop and Nested Loop

Syntax of if Statement :-

if(expression)

statement;

or

if(expression){

statement;}


if-else Syntax :-

if(expression) statement; else statement;

else if Clause :-

if(expression) statement; else if(expression) statement; else if(expression) statement; else statement;

 

 




Follow Us

Contact Us

tutorialworldin@yahoo.com

Back to Top