title | ms.custom | ms.date | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Overview of C Statements | Microsoft Docs |
11/04/2016 |
|
article |
|
|
0d49837a-5399-4881-b60c-af5f4e9720de |
8 |
mikeblome |
mblome |
ghogen |
C statements consist of tokens, expressions, and other statements. A statement that forms a component of another statement is called the "body" of the enclosing statement. Each statement type given by the following syntax is discussed in this section.
statement:
labeled-statement
/* Microsoft Specific */try-finally-statement /* Microsoft Specific */
Frequently the statement body is a "compound statement." A compound statement consists of other statements that can include keywords. The compound statement is delimited by braces ({ }). All other C statements end with a semicolon (;). The semicolon is a statement terminator.
The expression statement contains a C expression that can contain the arithmetic or logical operators introduced in Expressions and Assignments. The null statement is an empty statement.
Any C statement can begin with an identifying label consisting of a name and a colon. Since only the goto
statement recognizes statement labels, statement labels are discussed with goto
. See The goto and Labeled Statements for more information.