Skip to main content

Expressions and Statements in C


Expression

A combination of operands and operators that produces a value is called an expression.
More examples:

Statement

A statement is a complete instruction in C that performs an action. Most statements end with a semicolon (;).

Types of Statements

Declaration Statement — creates a variable:
Assignment Statement — assigns a value:
Expression Statement — evaluates an expression:
Function Call Statement — calls a function:
Control Flow Statement — changes execution order:
Compound Statement (Block) — a group of statements enclosed in {}:
A block is treated as a single unit. Variables declared inside a block are local to that block.

Key Difference