Control structures’ task is to give a programme logic and flow. In C++, there are three different types of fundamental control structures.
Sequence Structure
Sequence structure describes the order in which a programme executes its instructions.
Selection Structure
The execution of instructions in accordance with the specified condition—which may be true or false—is referred to as a selection structure. It is possible to use selection structures in two different ways. Either if-else statements or switch case statements are used to accomplish these tasks.
Loop Structure
Until the condition becomes false, an instruction is executed in a loop, which is referred to as a loop structure.