1. C is based on the design of Java.
2. C is a design ancestor of C++ and Java.
3. All programming languages use the same style of statements.
4. Both C and Java share Eiffel as a common design ancestor.
5. None of the above
C has primitive types that are built into the language, but which of the following are not pimitive types in C?
1. bool
2. string
3. int
4. char
5. None of the above
Whenever a boolean type result is required in C (e.g., in an "if" statement),
1. Any non-zero value represents false.
2. Only the zero (0) value represents false.
3. Only one (1) value represents true.
4. Any non-zero value represents true.
5. None of the above
In C, "&&" and "||" are short-circuit boolean operators just like in Java, while the "&" and "|" operators in C
1. Perform full boolean evaluation.
2. Are undefined.
3. Are synonyms for "&&" and "||".
4. Perform the bitwise-and and bitwise-or functions.
5. None of the above
The "!" operator in C is used to perform
1. Logical negation (e.g., turn "true" into "false").
2. Numeric negation (e.g., turn "-3" into "3").
3. Numeric inversion (e.g., turn "5" into "1/5").
4. Array reversal (reversing the items within an array).
5. None of the above
The assignment operator (=) in C
1. works exactly like assignment in Java.
2. cannot be used in boolean expressions.
3. can be used in arithmetic expressions.
4. returns the value assigned as its value.
5. None of the above
Which pairs of operators can be easy to confuse but difficult to notice and debug because they can often (though not always) yield the same results?
1. + and ++
2. = and ==
3. & and &&
4. | and ||
5. None of the above
This example of a pre-increment operator, "x = 12; array[++x] = 3;", assigns
1. "array[12]" the value of 3
2. "array[13]" the value of 3
3. "array[12]" the value of 4
4. "array[13]" the value of 4
5. None of the