1/13
Vocabulary flashcards covering the core concepts of Module 2: The Building Blocks of C Programming, including basic program structure, fundamental data types, variable rules, and constants.
A preprocessor directive that lets the program use standard input/output tools.
int main(void)
The main function where the C program execution starts.
printf(…)
An instruction that displays text; most statements containing it end with a semicolon.
return 0;
A statement that signals that the program finished successfully.
Data type
A classification that tells C what kind of information a variable will hold.
int
A data type used for whole numbers (e.g., int age = 18;).
float
A data type used for decimal numbers (e.g., float price = 9.50;).
double
A data type used for more precision decimal numbers (e.g., double pi = 3.141592;).
char
A data type used for a single character enclosed in single quotes, like 'A'.
char x[n]
A data type specification used for a string of characters enclosed in double quotes, like "Hello".
Variable
A labeled storage box comprised of a type, name, and value that can change while the program runs.
Variable naming rules
The rules for naming variables in C: no spaces, do not start with a number, and avoid reserved words like int or if.
Constant
A value meant to stay fixed that cannot be reassigned or changed accidentally (examples: tax rate, PI, maximum number of attempts).
const
A keyword used to declare a constant and prevent reassignment of its value (e.g., const float TAX_RATE = 0.10f;).