Module 2: The Building Blocks of C Programming

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

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.

14 Terms

1
New cards

include

A preprocessor directive that lets the program use standard input/output tools.

2
New cards

int main(void)

The main function where the C program execution starts.

3
New cards

printf(…)

An instruction that displays text; most statements containing it end with a semicolon.

4
New cards

return 0;

A statement that signals that the program finished successfully.

5
New cards

Data type

A classification that tells C what kind of information a variable will hold.

6
New cards

int

A data type used for whole numbers (e.g., int age = 18;).

7
New cards

float

A data type used for decimal numbers (e.g., float price = 9.50;).

8
New cards

double

A data type used for more precision decimal numbers (e.g., double pi = 3.141592;).

9
New cards

char

A data type used for a single character enclosed in single quotes, like 'A'.

10
New cards

char x[n]

A data type specification used for a string of characters enclosed in double quotes, like "Hello".

11
New cards

Variable

A labeled storage box comprised of a type, name, and value that can change while the program runs.

12
New cards

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.

13
New cards

Constant

A value meant to stay fixed that cannot be reassigned or changed accidentally (examples: tax rate, PI, maximum number of attempts).

14
New cards

const

A keyword used to declare a constant and prevent reassignment of its value (e.g., const float TAX_RATE = 0.10f;).