Typed variable
Variable with a specified type.
Syntax
type name = value;
Description
C is statically typed: int (integer), float/double (decimal), char (character). The type is written first.
Example
Loading editor…
Expected output
36 1.72 A
When to use?
Storing all kinds of data.
Common mistakes
- ⚠️ char with single quotes: 'A'. Text (character array) with double quotes: "Alex".