Lesson 5 of 50
cVariables & Constants
6 mins
Course progress10%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 5 of 50
c6 mins
Keep these ideas in mind as you work through the lesson.
Variables store values of a specific type and must be declared before use. const makes a variable read‑only after initialization.
int age = 30; // mutable variable
const double PI = 3.14159; // constant, cannot be reassigned