Home   |   About   |   Terms   |   Contact    
A platform for writers

What is Block Statement in C++ ?


☯ All C++ Articles     ☯ All Articles

Popular Google Pages:

◕ Send your story to RiyaButu.com and get ₹ 500/- Details..

◕ Bengali Story writing competition. Details..

This article is regarding Block Statement in C++.
Last updated on: .

◕ Let a simple program:
#include <iostream>
using namespace std;
int main(){
cout << "We are Boss!" << endl;
return 0;

Here the line,
cout << "We are Boss!" << endl;
is a statement.

What is Statement Block in C++?

We can enclose several statements between a pair of braces. Then they become a block, and behave like a block. This block is called Block Statement or Compound Statement.

In the above program, the statements inside the main function are

cout << "We are Boss!" << endl;
return 0;

These statements as whole is called a
Block Statement.

Such a compound statement or block statement can be thought as a single statement. These blocks can be placed inside other blocks. This means blocks can be nested, one within another up to any depth.

Top of the page

Amazon & Flipkart Special Products


Top of the page