Programming Chapter 2
True
Post-Increment has the syntax variable++.
True
Suppose a=5. After the execution of the statement ++a; the value of a is 6.
Alpha=50
Suppose that alpha and beta are int variables and alpha = 5 and beta = 10. After the statement alpha *= beta; executes, ____.
Alpha = 50
Suppose that alpha and beta are int variables and alpha = 5 and beta =10. After the statement alpha*=beta; executes, _________.
True
Suppose we declare a variable sum as an int. The statement sum+=7; is equivalent to the statement sum=sum+7.
False
A unary operator has only two operands.
Mixed Expression
An expression that has operands of different data types is called a _________.
True
C++ tokens include special symbols, word symbols, and identifiers
False
Comments are for the compiler, not the reader
True
If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right.
Assignment Operator
In C++, = is called the ________.
char
The ______ data type, the smallest integral data type, is used to represent characters.
Syntax
The ______ rules of a programming language tell you which statements are legal, or accepted, by the programming language.
Bool
The data type _____ has only two values: true and false.
Four
The memory allocated for a float is ______ bytes.
3
The value of the expression 17%7 is ______
3
The value of the expression 33/10, assuming both values are integral data types, is _________.
program_1
Which of the following is a legal identifier?
\n
Which of the following is the newline character?
46259
________ is a valid int value.
False
cin does not allow more than one value to be read at a time