1/17
Vocabulary flashcards covering key C programming concepts, data types, standard input/output functions, constants, and variables based on EE 30 Lecture 2.
Statements (in C)
Instructions that a computer program follows in C, where every statement must end with a semicolon ';'.
Variable
A named storage location in the computer's memory used to hold a data value that can change during program execution.
Declaration
The step in programming that tells the compiler a variable's name and data type so it can allocate the correct amount of memory space.
Initialization
The step that assigns an initial value to allocated memory space using the '=' assignment operator.
Constant
A variable in C that should not change during execution, declared using the 'const' keyword to make it unchangeable and read-only.
int
A C data type used for signed whole numbers without decimals, occupying 4bytes (or 2 to 4bytes) of memory.
char
A C data type occupying 1byte of memory that stores a single character, letter, number, or ASCII value, and can be signed or unsigned.
float
A single-precision floating-point data type in C occupying 4bytes of memory, sufficient for storing 6 to 7 decimal digits.
double
A double-precision floating-point data type in C occupying 8bytes of memory, sufficient for storing 15 decimal digits.

Floating Point Representation
A 32-bit structure comprising a 1-bit sign (S), an 8-bit exponent, and a 23-bit significand, capable of representing numbers from 2.0×10−38 to 2.0×1038.
printf()
A standard C library function that formats data and sends it to the standard system display device (stdout/monitor).

Format Specifier
A placeholder symbol starting with '%' inside printf() or scanf() functions used to output or input specific data types (such as %d for int, %f for float, %lf for double, %c for char, %s for strings).
scanf_s() / scanf()
A formatted input function in C that reads data from stdin according to specified format specifiers and stops reading strings at the first whitespace.
gets_s()
A bounds-checked, line-oriented input function in C designed to safely read an entire line of text including spaces until a newline character '\n' or EOF is encountered.
getchar()
A standard C input function that reads a single character from the standard input stream each time without requiring format specifiers or size parameters.
Address-of Operator (&)
An operator used in scanf() before non-array variable names to specify the memory address where user input should be stored.

gets_s vs scanf_s
gets_s reads a full line, stops at '\n', handles spaces, and requires no format specifier; scanf_s reads formatted input, stops at whitespace, does not handle spaces, and requires format specifiers (%s, %c, %d, etc.).