Skip to main content

Section 3.15 Vocabulary

variable:
A named storage location for values. All variables have a type, which is declared when the variable is created.
value:
A number or other data that can be stored in a variable. Every value belongs to a type (e.g., int or string).
literal value:
A value that is written directly in the code.
type:
Mathematically speaking, a set of values. The type of a variable determines which values it can have.
declaration:
A statement that creates a new variable and specifies its type.
keyword:
A reserved word used by the compiler to analyze programs. You cannot use keywords (like int and void) as variable names.
assignment:
A statement that gives a value to a variable.
initialize:
To assign a variable for the first time.
state:
The variables in a program and their current values.
memory diagram:
A graphical representation of the state of a program at a point in time.
operator:
A symbol that represents a computation like addition, multiplication, or string concatenation.
operand:
One of the values on which an operator operates. Most operators in C++ require two operands.
expression:
A combination of variables, operators, and values that represents a single value. Expressions also have types, as determined by their operators and operands.
order of operations:
The rules that determine in what order expressions are evaluated. Also known as β€œoperator precedence”.
modulo:
An operation that yields the remainder when one integer is divided by another. In C++, it is denoted with a percent sign: 5 % 2 is 1.
modulus:
The value of b in the expression a % b. It often represents unit conversions, such as 24 hours in a day, 60 minutes in an hour, etc.
prompt:
A brief message displayed in a print statement that asks the user for input.
You have attempted of activities on this page.