startMiner - free and simple next generation Bitcoin mining software

What is Control Structure in C++ .

What is Control Structure





A statement used to control the flow of execution in  a program is called control structure.
There are three types of control structure in C++.
  • Sequence Structure
  • Selection Structure
  • Repetition Structure
1-Sequence Structure:
In this structure the statements or set of statements are executed in the a sequence.
Statements are  executed in same the order in which they are specified in program.
It mean no statement is skipped or no statement executed more that once.

2-Selection Structure:
This structure select a statement or set of statement on the basis of a condition.
It works when a particular condition is true and ignored when condition is fals.
Different types of selection structure.
  • if
  • if else
  • if else if
  • switch
  • etc
3-Repetition Structure:
A repetition structure execute a statement or statement repeatedly.
It is also known as iteration or loop structure.
Types of Repetition structure.
  • While
  • Do-While
  • For
What is Control Structure in C++ . What is Control Structure in C++ . Reviewed by Alpha on 3/06/2017 03:49:00 pm Rating: 5

No comments:

Theme images by mariusFM77. Powered by Blogger.