Control Statement in C++



Control statements are how programmers indicate which sections of code to use at specific times. Control statements are elements in the source code that control the flow of program execution. They include blocks using { and } brackets, loops using for, while and do while, and decision-making using if and switch. There's also goto. There are two types of control statements: conditional and unconditional.


Programs consist of sections or blocks of instructions that sit idle until they are needed. When needed, the program moves to the appropriate section to accomplish a task. While one section of code is busy, the other sections are inactive.


Below are the control Statements in C++. Click the link below to know more about them.

  1. If Else

  2. Switch

  3. For Loop

  4. While Loop

  5. Do While loop

  6. Break

  7. Continue

  8. Goto

  9. Comments



Source: Wikipedia


Sofia Sondh


The Tech Platform

www.thetechplatform.com