Chapter 2 - CS123 - C++
collating sequence
ordering of characters based on the character set code.
keywords
reversed words are also called ___
double
An example of a floating point data type is ____.
false
An operator that has only one operand is called a unique operator.
beta = beta - 1; alpha = beta;
Suppose that alpha and beta are int variables. The statement alpha = beta--; is equivalent to the statement(s) ____.
2
Suppose that count is an int variable and count = 1. After the statement count++; executes, the value of count is ____.
True
Suppose that sum is an int variable. The statement sum += 7; is equivalent to the statement sum = sum + 7; ( t or F)
int a,b,c;
The declaration int a, b, c; is equivalent to which of the following?
four
The memory allocated for a float value is ____ bytes.
one = 10.5, two = 30.6
In a C++ program, one and two are double variables and input values are 10.5 and 30.6. After the statement cin >> one >> two; executes, ____.
True
Suppose a = 5. After the execution of the statement ++a; the value of a is 6. ( T or F)
50
Suppose that alpha and beta are int variables and alpha = 5 and beta = 10. After the statement alpha *= beta; executes, ____.
beta = beta + 1 alpha = beta
Suppose that alpha and beta are int variables. The statement alpha = ++beta; is equivalent to the statement(s) ____.
beta = beta -1 alpha = beta
Suppose that alpha and beta are int variables. The statement alpha = --beta; is equivalent to the statement(s) ____.
alpha = beta; beta = beta + 1;
Suppose that alpha and beta are int variables. The statement alpha = beta++; is equivalent to the statement(s) ____.
char
Which of the following is a reserved word in C++?
prompt lines
____ are executable statements that inform the user what to do.
'A'
____ is a valid char value.
46259
____ is a valid int value.
identifier
a C++ ____ consists of letters, digits, and the underscore character and must begin with a letter or underscore
floating point
a data type that deals with decimal numbers
integral
a data type that deals with integers, or numbers without a decimal part
variable
a memory location whose contents can be changed
programming language
a set of rules, symbols, and special words.
data type
a set of values together with a set of allowed operations
enumeration
a user dine data type
predefined or standard
functions that are already written and are provided as part of the system.
False
( T or F )A comma is also called a statement terminator.
false
( T or F )A mixed arithmetic expression contains all operands of the same type.
True
( T or F )If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right. (t or f)
false
( Tor F )In C++, reserved words are the same as predefined identifiers.
True
(T or F )The maximum number of significant digits in values of the double type is 15.
3
The value of the expression 17 % 7 is ____.
program_1
Which of the following is a legal identifier?
semantic rules
determine the meaning of the instructions.
syntax rules
tell you which statements and which are not
token
the smallest unit of a program written in any language is called a
floating point notation
to represent decimal numbers, C++ uses a form of scientific notation called ____notation.