answersLogoWhite

0

A compound statement consists of none or more C++ statements enclosed within a set of braces: {}. It is an essential concept in C++ and is central to the idea of nesting constructs. For example, the if statement has the form:-

if ( expression ) statement

which would severely limit its use were it not for the fact that a compound statement is itself a statement. Consequently any number of statements can be enclosed within a set of braces, including other if and compound ones, and the resulting compound statement used with the if statement. For example:-

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

What is the truth or falsity of a statement is called its?

compound statement


What is a compound statement in programming?

A compound statement is a code block. We typically use compound statements as the body ofanother statement, such as a while statement:while (i >= 0){a[i] = x;++x;--i;}Note that all compound statements are surrounded by braces {}.


What is java compound statement?

A compound statement is a group of statements enclosed in braces, i.e curly brackets. A compound statement is a group of statements enclosed in braces, i.e curly brackets.


Is a simple statement is sometimes called a compound statement?

YEs


What is the difference between blocks and compound statements?

A compound statement is a single statement which combines the work of multiple individual statements. A block is a collection of individual statements. Block: ++i; x = i; Compound statement: x = ++i;


Is statement a compound word?

No. A compound word is formed from two separate words. In the word statement, "state" is a separate word, but "ment" is not a separate word.


What is compound statement in c plus plus program?

A compound statement is a code block. We typically use compound statements as the body ofanother statement, such as a while statement:while (i >= 0){a[i] = x;++x;--i;}Note that all compound statements are surrounded by braces {}.


The truth or falsity of a statement is called?

compound


Is C function a compound statement?

yes


What is a compound statement formed by joining two statements with the connector OR?

The new statement is called a "disjunction"


How many expressions are there in if statement?

One: if (expression) statementOf course 'statement' can be another expression, or can be a compound statement containing countless expressions, or can be another if...


How do you group compound statement in c plus plus?

A compound statement is any statement that contains zero or more statements. If there is more than one statement in a compound statement, they must be enclosed in braces {}, otherwise braces are optional with the exception of function bodies (which must always be enclosed in braces, regardless of the number of statements they contain).For example, the if statement has the following syntax:if( expression ) statement1 [elsestatement2]Either statement may be a compound statement containing zero or more statements (including other if statements). For instance, suppose x is a random signed integer:if( x