In C, variables are used to store data, and each variable has a type that determines the kind of data it can store.
#includeint main() { int age = 25; float height = 5.9; char grade = 'A'; printf("Age: %d\n", age); printf("Height: %.1f\n", height); printf("Grade: %c\n", grade); return 0; }
This program declares variables of type int
, float
, and char
and prints their values.