1/46
Vocabulary practice flashcards covering fundamental computer science topics, including arrays, computer architecture, functions, decision structures, and repetition structures from COMP 1125.
Array
A single data structure that holds multiple values of the same type stored contiguously in memory, tracked by the address of its first element.
Element
An individual value stored within an array.
Array Index
A zero-based numerical position corresponding to an element's location in an array.
Subscript
Bracket notation applied to an array variable (also called indexing into the array) used to access or reassign specific elements.
Range-Based for Loop
A loop introduced in C++ 11 (also called a for-each or enhanced for loop) that iterates directly over the values of an array rather than their index positions.
Central Processing Unit (CPU)
The hardware component responsible for executing programs; it houses the control unit and the arithmetic and logic unit (ALU).
Main Memory (RAM)
Fast, expensive, volatile memory where programs and data currently being executed must reside for quick access by the CPU.
Secondary Storage
Non-volatile, relatively inexpensive storage designed to hold data for long periods without power, such as disk drives, SSDs, and flash drives.
Byte
A unit of computer storage consisting of 8 bits, capable of holding a small number or a single letter.
Kilobyte (KB)
A unit of digital memory consisting of 210 bytes, which is equal to 8192 bits.
Two's Complement
A binary storage method used to represent negative numbers in computers, conceptualized as having an extra leading sign bit.
Floating Point Technique
A computer technique used to store numbers with fractional decimal parts by separating binary components across a decimal point.
ASCII
American Standard Code for Information Interchange; a set of 128 numeric codes used to represent English letters, punctuation marks, and other characters.
Top Down Design
A programming methodology that involves breaking down a complicated task into smaller and smaller pieces until each piece is manageable.
Pseudocode
A syntax-free, mock-up version of a program used in program design that is not meant to be compiled or executed.
Preprocessor Directive
A statement starting with a pound sign (#), such as #include, instructing the preprocessor to replace directives with code from specified library files before compilation.
Garbage Data
Unpredictable leftover bit patterns found at a variable's memory address when declared inside a function without explicit initialization.
Named Constant
A variable declared with the const keyword that represents a fixed value that cannot be altered after initialization.
Magic Number
An unexplained, literal numeric value appearing directly in source code that can cause confusion during maintenance.
Type Casting
The explicit process of converting or treating a value of one data type as another data type, such as using static_cast.
Widening Conversion
A type conversion converting a smaller data type to a larger data type without the risk of data loss.
Modular Programming
A programming approach where large programs are divided into individual, self-contained functions that can be combined to solve complex problems.
Function Header
The opening part of a function definition containing its return type, function name, and parameter list.
Function Signature
The combination of a function's name and its parameter list.
void Function
A function that performs a task but does not return a value back to the calling statement.
Parameter
A variable declared in a function header's parameter list that is local to the function and receives input data from outside.
Argument
The actual value or expression passed into a function when it is called to initialize the function's parameter.
Function Prototype
A function header declaration placed before main() or other calling code that allows functions to be defined in any physical order.
Pass By Value
The default argument-passing mechanism where a copy of the argument value is delivered to the function, preventing modifications to the original caller variable.
Pass By Reference
An argument-passing mechanism using the ampersand (&) operator that passes the actual memory address, allowing the function to modify the caller's variable.
Boolean Expression
An expression evaluated to either true (1) or false (0), commonly formed using relational and logical operators.
Compound Boolean Expression
An expression created by linking two or more Boolean expressions together using logical operators such as && (and) or || (or).
Short Circuit Evaluation
A process where C++ skips evaluating the second sub-expression of a logical operator when the first operand suffices to determine the final result.
Single Alternative Decision Structure
A decision structure, such as an if statement, that provides only a single alternative path of execution if a condition is met.
Dual Alternative Decision Structure
A decision structure, such as an if-else statement, providing two separate execution paths: one if true, and another if false.
Switch Statement
A multi-branch decision structure that matches an integer-compatible expression against constant expression cases, typically terminating branches with break.
Scope
The region or boundaries of a program where a declared variable is recognized and accessible.
getline() Function
A standard C++ function that accepts an input stream and target string variable to capture a full line of user input, including whitespace.
Repetition Structure
A control structure (commonly called a loop) that enables the program to execute a block of code multiple times.
Iteration
A single full execution of the body of code contained within a loop.
Infinite Loop
A loop containing a condition that never becomes false, forcing the repetition to run indefinitely unless interrupted by an external action.
Pretest Loop
A loop (such as a while or for loop) where the controlling Boolean expression is evaluated prior to executing each iteration.
Posttest Loop
A loop (such as a do-while loop) that executes its loop body at least once before testing the controlling condition.
Augmented Assignment Operators
Shortcut operators (such as +=, -=, *=) that update the existing value of a variable relative to itself.
Accumulator Variable
A variable that maintains a running total by being augmented during each successive iteration of a loop.
Sentinel Value
A special, predefined value used as a flag to terminate a loop, intentionally chosen because it cannot be mistaken for valid input.
continue Statement
A jump statement inside a loop body that causes the remainder of the current iteration to be skipped, immediately progressing to the next iteration.