Computer Science, asked by amanpal9555, 9 months ago

what is a compound statement or block? Give an example.​

Answers

Answered by rakzhana22
0

Answer:

&lt;body bgcolor=violet&gt;&lt;marquee direction="down"&gt;&lt;font color=blue&gt;</p><p>A compound statement (also called a block, or block statement) is a group of zero or more statements that is treated by the compiler as if it were a single statement. Blocks begin with a { symbol, end with a } symbol, with the statements to be executed being placed in between.

&lt;body bgcolor=violet&gt;&lt;marquee direction="down"scrollamount=500&gt;&lt;font color=blue&gt;

Answered by Anonymous
13

A compound statement is said to be ill-formed if it is ambiguous as to how its substatements are grouped by the action of the connectives. For example, in natural language: I would like some juice or water with ice.

A compound statement (also called a block, or block statement) is a group of zero or more statements that is treated by the compiler as if it were a single statement. ... Blocks can be used anywhere a single statement is allowed.Consider statements p:=1+1=2 and q:=2<5. Note that, p∧q is true only if both p and q are both true. Since statements p and q are both true, p∧q is true.

Similar questions