Bifalgorithm post · Computer science one · Declaration & Assignment
How can you declare multiple variables and constants in C?
How can you declare multiple variables and constants in C? (Computer science one · Declaration & Assignment) — "As another shorthand, we can declare multiple v…
Ideas in this flowchart
- Shorthand for declaring variables and defining constants
- Multiple variables can be declared on the same line
- Variables are delimited with commas
- Variables declared together must have the same type
- Assignments can be included in the declaration
- The int declaration can combine variables and assigned values
- The double declaration can combine variables and an assigned value
- The const keyword defines a constant
- A const variable is read-only
- A constant must be assigned a value at declaration