What do you understand by statement ?

What do you understand by statement ?

Ans.  An expression such as –

A = 1000, x ++, or cout << “HI”, when followed by semicolon, becomes a statement. In C++, the semicolon is a statement terminator, rather than a separator as in Pascal. C++ allows grouping of statements, which have to be treated as an entity and the resulting group is called compound statement or block. It consists of declarations, definitions and statements enclosed within braces {and} as follows –


Int a;

Int b = 10;

A = b + 100;

Share this post