1/49
Vocabulary flashcards covering core introductory computer science, procedural programming concepts, C++ basics, hardware, and data types from Programming 1A.
Procedural programming
A programming approach that organises code into procedures/functions executing tasks step by step.
Core principle of procedural programming
Breaking a problem into ordered steps or procedures that perform specific tasks.
Algorithm
A finite, ordered set of steps for solving a problem.
Source code
Human-readable instructions written in a programming language.
Compiler
Translates source code into another form, often machine code/executable, before execution.
Interpreter
Reads/translates and executes program instructions as the program runs.
Compiler vs. Interpreter (Key Difference)
A compiler translates ahead into a target program; an interpreter executes instructions during runtime.
Five main computer hardware components
Input, output, CPU, main memory (RAM), and secondary storage.
Input devices (examples)
Keyboard and mouse (also scanner, microphone, webcam).
Output devices (examples)
Monitor and printer (also speakers).
CPU (Central Processing Unit)
The central processing unit; it executes instructions and processes data.
RAM (Main Memory)
Temporary, volatile memory used to hold data/programs currently in use.
Volatile memory
Memory whose contents are lost when power is turned off.
Secondary storage
Long-term storage such as an SSD or hard drive; it retains data without power.
Binary
A base-2 number system using only 0 and 1.
Binary place values (8-bit number, left to right)
128, 64, 32, 16, 8, 4, 2, 1.
Binary to decimal conversion method
Multiply each bit by its place value and add the results.
Decimal equivalent of binary 00001101
8+4+1=13.
ASCII
American Standard Code for Information Interchange; a character encoding standard.
ASCII decimal code for uppercase 'A'
65.
ASCII decimal code for lowercase 'a'
97.
SRS (Software Requirements Specification)
A document describing what the software must do and its requirements.
Four common sections of an SRS
Introduction/purpose, overall description, functional requirements, non-functional requirements (sections vary by template).
Functional requirements
Statements describing actions or services the system must provide.
Non-functional requirements
Quality or constraint requirements such as performance, security, usability, or reliability.
Variable
A named storage location whose value may change while the program runs.
Named constant
A named value intended not to change; in C++ it is declared using const.
Constant declaration in C++ (Syntax Example)
Example: const double TAX = 0.15;
Assigning to a const variable
Causes a compile-time error.
Integer (int)
A data type for whole numbers, without a fractional part.
Double
A floating-point type commonly used for decimal values with more precision than float.
Char
A type that stores a single character, such as 'A'.
Bool
A Boolean type that stores true or false.
String
A sequence of characters used to represent text.
Initialization
Giving a variable its starting value when it is declared.
Assignment
Giving or changing a variable's value using the assignment operator =.
Difference between = and ==
= assigns a value; == compares two values for equality.
Function
A named block of code designed to perform a task and optionally return a value.
Reasons to use functions
Reuse code, divide a problem into smaller parts, improve readability, and simplify testing.
Function call
An instruction that invokes/executes a function.
Parameter
A variable listed in a function definition that receives an input value.
Argument
The actual value or variable supplied when calling a function.
Return value
The value a value-returning function sends back to its caller.
void (return type)
Indicates that the function does not return a value.
return statement
Ends the function and sends back its specified value, if applicable.
Local variable
A variable declared within a function/block; available only within its scope.
Global variable
A variable declared outside functions, generally accessible throughout its scope in the file/program.
Issues with global variables
They can cause hidden dependencies, unintended changes, and make code harder to debug/maintain.
Pass by value
The function receives a copy; changing the parameter does not change the caller's original variable.
Pass by reference
The function receives an alias/reference; changes through it can affect the caller's original variable.