What are C statements

Overview of C statements

C statements consist of tokens, expressions, and other statements. An instruction that is a component of another instruction is referred to as the "text" of the enclosing instruction. Each type of statement specified by the following syntax is explained in this section.

syntax

statement: labeled-statement

compound statement

expression-statement

selection statement

iteration-statement

jump-statement

try-except statement / * Microsoft-specific * /

try-finally statement / * Microsoft-specific * /

An instruction text is often a "compound instruction". A compound statement consists of other statements that can contain keywords. The compound statement is in curly brackets ( { } ). All other C statements end with a semicolon ( ; ). The semicolon is a statement terminator.

The expression statement contains a C expression, which can contain the arithmetic or logical operators introduced in expressions and assignments. The null statement is an empty statement.

Every C statement can begin with an identifying designation consisting of a name and a colon. Since only the instruction recognizes instruction names, instruction names are also explained. For more information, see The goto and Labeled Statements.

See also

instructions