Computer Science C++ Vocabulary

Machine Language

The most primitive computer instructions represented by long strings of 0's and 1's. [p15]

Assembly Language

A human-readable version of the primitive computer instructions using words like ADD, MOV, etc instead of 0's and 1's. [p15]

Assembler

A program that runs on a computer and translates a file of human-readable Assembly Language instructions into Machine Language instructions. [p15]

Compiler

A program that runs on a computer and translates a file of more advanced human-readable instructions in languages like C++ into Machine Language instructions. [p16]

Debugger

A program that runs another program (one that you are trying to understand and/or fix) by letting the user step from one instruction to another and examine the internal data/memory as it goes

Text Editor

A program that allows a user to type in programming instructions in languages like C++ and format, check and save the instructions to a file to be run through a compiler. [p9]

IDE

An acronym for Integrated Development Environment. A set of programs (Compiler, Debugger, Text Editor) combined into a single interactive user environment that allows programmers to develop, debug and maintain their programs easier.

Source File

A text file on disk that contains computer instructions in a programming language like C++.

Header File

A text file on disk that contains function declarations that should be shared across multiple source files but without the function definitions

Executable File

A file on disk containing the Machine Language created by a compiler for a given set of program files. Executable files are not human-readable

Single-step debug

The process of executing a program one statement at a time in a debugger

Step Into

When running a program in a debugger, Step Into will step into the function call at the current line (if there is a function call).

Step Over

When running a program in a debugger, Step Over will step over the function call at the current line

Step Out

When running a program in a debugger, Step Out will cause all of the rest of the statements in the current function to be executed and the function return back to where it was called

Procedural Programming

A method of creating programs where the program is thought of as a series of actions performed on a set of data. The first statement is executed, then the second, the third, etc. [p16]

Structured Programming

A modification to the method of Procedural Programming where the task to be accomplished by the program is broken down into smaller sequences of actions that are easier to manage (divide-and-conquer). [p16]

Object-oriented Programming (OOP)

A method of creating programs where the data and the procedures that act on that data are grouped together as a single object - a self-contained entity with an identity and characteristics of its own. [p18]

Encapsulation

The concept in OOP that everything related to doing one thing completely is encapsulated into a single object. [p18]

Inheritance

The concept in OOP that one type of object can be the basis for another type of object. The first is the parent or base, the second is the child. The child inherits all of the behavior of the parent object and adds its own new behavior. [p18]

Polymorphism

The concept in OOP that a group of objects can be based on a common parent object but have special forms of the common parent's behavior. [p19]

Comment

Lines of text in source files that explain what that part of the program is doing but is not actually run (it is ignored by the compiler). In C++ comments can be a single line, starting with double-slash "//" or a multiline comment starting with slash-sta

Data Type

A classification for various types of data like numbers, letters, etc. The data type identifies how much memory is required to store a value of that type. [p30]

Integer

A specific data type that describes whole number values between -2,147,483,648 and 2,147,483,647. In C++, declaring a variable with this data type would look like: "int some_variable". [p30]

Unsigned Integer

A specific data type that describes whole number values between 0 and 4,294,967,295. In C++, declaring a variable with this data type would look like: "unsigned int some_variable". [p30]

Short

A specific data type that describes whole number values between -32,768 and 32,767. In C++, declaring a variable with this data type would look like: "short some_variable". [p30]

Unsigned Short

A specific data type that describes an integer value between 0 and 65,535. In C++, declaring a variable with this data type would look like: "unsigned short some_variable". [p30]

Boolean

A specific data type that describes a Boolean value, i.e. either TRUE or FALSE. In C++, declaring a variable with this data type would look like: "bool some_variable" and could only hold the values "true" or "false". [p30]

String

A specific data type that describes a sequence of keyboard characters, typically in double-quotes.

Character

A specific data type that describes a single character from a keyboard. In C++, declaring a variable with this data type would look like: "char some_letter". [p30]

Float

A specific data type that describes real numbers with typically 7 significant digits (+/- 3.4 * 10^+/-38). In C++, declaring a variable with this data type would look like: "float some_variable". [p32,33]

Double

A specific data type that describes large real numbers typically with 19 significant digits (+/- 1.7 * 10^+/-308). In C++, declaring a variable with this data type would look like: "double some_variable". [p33]

Typedef

A special keyword in C++ that allows you to create a new (shorter) name for an existing data type. For example, "typedef unsigned short USHORT" creates a new data type called USHORT that is the same as an unsigned short. [p36]

Function

A function is a group of statements in a program that perform a specific task in relative isolation from the remaining code. [p23]

Function Name

A short identifier that uniquely names this function. [p23]

Function Parameter

A variable declared in the parameter list of a function declaration.

Parameter List

A list of function parameters that the function requires in order to perform its task. Each item in the list includes the data type and a unique name for the parameter. [p23,69]

Function Signature

The name of a function along with the data type and order of its parameters makes up the signature of the function. [p24]

Function Body

The statements inside of a function that perform some task on the data given to the function through the parameter list. [p24]

Return Type

The data type describing the kind of data that the function will return to the caller. [p64]

Function Arguments

In a function call, the arguments represent the data that will be passed to the function

Function Call

A statement in a program that calls a function, passing to it the correct quantity, order and data type argument values to satisfy the parameter list of the function being called

Function Declaration

A statement placed at the top of a source file (or in a header file) that declares the name and parameter list of a function (no function body). [p64]

Function Prototype

Same as function declaration. [p64]

Function Definition

The complete definition of a new function including the name, parameter list, return type and body (statements).

Variable

A named location in memory of sufficient size to hold the data described by the data type of the variable. [p29]

Constant

A value in a program that cannot be altered. [p37]

Literal Constant

A constant value in a program whose meaning is exactly what the literal characters represent, like the constant 5 (an integer with value 5) and the constant 3.14 (a float with a value 3.14). [p37]

Symbolic Constant

A constant value in a program that is given a unique name (identifier) and initialized once (and only once) with a value that cannot be altered afterwards. The symbolic constant declaration "const float PI_VALUE 3.14;" declares a symbolic constant PI_VALU

Enumerated Constant

A special data type made up of one or more symbolic constants (whose value is unique but immaterial) that form a set of allowed values that a variable declared with such a data type would be allowed to hold. Example, "enum vehicle_types {vCar, vBus, vTrai

Keyword

A word (or symbol) in a programming language that has special meaning and cannot be used as the name of a function, variable, data type, etc. In C++, the reserved words are words like "for", "while", "do", "void", "int", etc.

Identifier

A sequence of characters in a program that create the unique name for an object like a function or variable. In C++, identifiers must not be keywords and must start with a letter and may contain letters, numbers, and underscore.

Initializing a Variable

Assigning a value to a variable at the time it is declared is called initializing the variable. Example, "int high_score = 15000;". [p35]

Development Cycle

The cycle of steps that programmers go through while developing their program. The steps typically include: 1. Editing the source files, 2. Compiling the source files, 3. Linking the compiled files into an executable application, 4. Running the applicatio

Statement

A specific instruction in a program. In C++ all statements end in semi-colon. [p43]

Compound Statement

A grouping of one or more statements using curly-braces { }. [p44]

Whitespace

Extra space (or TAB) characters in a program that are used to help the programmer understand the program. Whitespace has no impact on the application. [p43]

Expression

A statement in a program that performs some calculation involving operators and data that produces a result. [p44]

Operator

A symbol that causes the compiler to take an action such as assigning a value or performing multiplication, addition, etc. [p45]

Operand

A piece of data given to an operator. Most operators take two operands. Example, "5 + 6" has two operands (the 5 and the 6) and one operator (+).

Assignment Operator

A special operator that calculates the value provided to the right of the operator and places it in the location specified to the left of the operator. Example, "x = a + b;" causes the expression "a + b" to be calculated, and the result is placed in the v

Mathematical Operators

The standard math operators are Addition (+), Subtraction (-), Multiplication (*) and Division (/). [p46]

Modulus Operator

A special operator in C++ using the symbol "%" that determines the remainder of the integer division of the operands. Example, "22 % 3" returns 1 because the remainder after dividing 22 by 3 is 1. [p46]

Relational Operators

A type of operator that compares two operands and return true or false. The standard relational operators are Equal (==), Not Equal (/=), Greater Than (>), Greater Than or Equal (>=), Less Than (<) and Less Than or Equal (<=). [51]

Logical Operators

A type of operator that takes Boolean values and returns a Boolean result. In C++, the standard logical operators are AND (&&), OR (||) and NOT (!). The AND operator returns true if and only if both operands are true. The OR operator returns true if eithe

Combined Operators

In C++, two operators can be combined to make a shorthand version. Examples include, add-then-assign as in "y += 3;" which is identical to "y = y + 3;". [p47]

Increment Operator

A special operator that takes the current value of a variable, adds one and then places the new value back into the variable. In C++, the increment operator is "++". [p47]

Decrement Operator

A special operator that takes the current value of a variable, subtracts one and then places the new value back into the variable. In C++, the decrement operator is "--". [p47]

Prefix Operators

A special form of the increment and decrement operator where the operator precedes the name of the variable (as in "++x") and has the behavior of incrementing the current value of x and returning the result. [p48]

Postfix Operators

A special form of the increment and decrement operator where the operator appears after the name of the variable (as in "x++") and has the behavior of returning the current value of x and then incrementing x. [p48]

Operator Precedence

The order in which complex expressions are evaluated. For a complex expression like "x = 5 +3 * 8", the multiplication is performed first because it has a higher precedence. The addition is performed last. If two operators have the same precedence level t

If Statement

A special statement that evaluates a condition and, if the condition evaluates to true, then one or more statements are executed. If the condition is false, those statements are skipped. [p53]

If-Else Statement

An extension of the if-statement where a set of statements are provided to execute in the case where condition turns out to be false. [53]

Scope

The portion of a program in which a variable exists and can be used. [p68]

Local Variable

A variable declare within the current function body or block (i.e. it's declaration is local to the current code). [p66]

Global Variable

A variable declaration that is made outside of all functions and that can be manipulated by multiple functions. Globals are generate a bad idea. [p68]

Pass By Value

When calling a function and passing a variable name as an argument, the value of the variable is passed and, if that value is modified while inside of that function, the modification does not affect the variable's value at the point where it is called. Pa

Default Value (for Function Parameters)

A special form of function declaration where a value can be given to a parameter to use when the function call does not provide a value for all of the parameters in the function parameter list

Overloading Functions

Creating multiple functions with the same name but with a different quantity of parameters or different type of parameters

Inlining Functions

A special marker placed on a function that tells the compiler to insert the machine instructions corresponding to the function body into the place where the function was being called instead of inserting a call to the function

While loop

A while loop causes a program to repeat a group of statements as long as a starting condition remains true. [p81]

Do-While loop

A do-while loop is like a while loop except that the condition is checked at the end of the loop instead of the beginning - this means it will run the statements at least once. [p85]

Compound If-Statement

An if-statement with a compound statement as the statement to execute when the condition is true. [p54]

Prompt

Output that is designed to ask the user to do something

Ancestor

A class that is higher in an inheritance hierarchy than a referenced class

Child class

A subclass

Descendent

A class which is lower in the inheritance hierarchy and therefore inherits from a referenced class

Parent class

A superclass

Polymorphism

Declaring a variable to have one type while it refers to an object of a subclass of that type

Insertion Sort

A sorting algorithm where the leftmost value in the unsorted portion of the array gets iteratively swapped to move left until it is in the correct position of the sorted portion

Selection Sort

A sorting algorithm in which one swaps the largest value in the unsorted portion into the last position of the sorted portion of the array increasing the sorted portion

Bubble Sort

A sorting algorithm where neighbors are swapped and the large values move toward their correct positions

Infinite Loop

A loop that will never finish running because its condition will never be false

Console

The screen (console output) and keyboard (console input) used to perform basic text/numerical interactions with the user.