Ch 2 Flashcards
source code
- code written in high level language
- consists of preprocessor directives and program statements
- source program
preprocessor
- program that carries out preprocessor directives
- program that processes statements in a C++ program that begin with a #
keyword
reserved word
walk-through
the process of tracing values through a sequence
variable
memory location whose content may change during program execution
unary operator
operator with only one operand
token
smaller individual unit of a program written in any language
syntax rules
rules that describe which statements are legal/accepted by the programming language as well as what is not legal
string
sequence of 0 or more characters
stream insertion operator
”
stream extractor operator
”»”
takes information out of the stream and inputs it into a variable
statement terminator
semi colon
source code file (source file)
file containing the source code
single precision
values of the type “float”
simple data type
variable or named constant of that type that can only store one value at a time
simple assignment statement
statement that uses only the assignment operator to assign values to the variable on the left side of the operator
semantics
set of rules that give meaning to a language
semantic rules
rules that determine the meaning of the instructions
self-documenting identifiers
identifiers that describe the purpose of the identifier through the name
run-together word
identifier composed of two or more words that are combined without caps or underscores
reserved words
keywords
- word symbols in a programming language that cannot be changed in any program
prompt lines
executable statements that inform the user of what to do
programming language
set of rules, symbols and special words
programming
process of planning and creating a program
pre-increment
syntax “++ variable”
predefined (standard) function
function that is already written and provided as part of the system
pre-decriment
syntax “– variable”
precision
max number of significant digits
post- increment
syntax “variable ++”
post decriment
syntax “variable –”
output statement
output the standard output device via “cout” and “
operands
numbers in an arithmetic expression
null (empty) strings
string containing no characters
named constant
memory location whose content is not allowed to change during program execution
mixed expression
expression that contains operands with different data types
integral expression
expression in which all operands are integers
integral
data type that deals with integers or numbers without a decimal
input (read) statement
statement that places data into variables via “cin” and “»”
initialized
the 1st time a value is placed in a variable
increment operator
++
- increases value of variable by 1
implicit type correction
when value of one data type is automatically changed to another data type
identifier
- C++ identifier consists of letters, digits, and the underscore character
- must begin with letter or underscore
function (subprogram)
a collection of statements that when activated/executed it accomplishes something
floating-point notation
form of scientific notation used to represent real numbers
floating-point (decimal) expression
expression in which all operands in the expression are floating-point numbers
floating point
data type that holds decimal numbers
executable statements
statements that perform calculations, manipulate data, create output, accept input, etc
enumeration
user defined data type
double precision
values of the type “double”
decrement operator
”–” decreases the value of a variable by 1
declaration statements
statements used to declare things like variables
data type
set of values together with a set of operations
computer program
sequence of statements whose objective is to accomplish a task
compound assignment statement
statements used to write simple assignment statements in a more concise notation
collating sequence
predefined ordering for the characters in a set
character arithmetic
arithmetic operation on “char” data
cast operatior
- type conversion, type casting
- used to explicitly convert one data type to another data type
binary operator
operator that has two operands
associativity
associativity of arithmetic operations said to be from left to right
assignment operator
”=”
- assigns whatever is on the right side of the variable on the left side
arithmetic expression
expression constructed using arithmetic operators and numbers