Unlock access to all the studying documents.
View Full Document
Copyright Cengage Learning. Powered by Cognero.
1. In C++, reserved words are the same as predefined identifiers.
2. The maximum number of significant digits in values of the double type is 15.
3. The maximum number of significant digits in float values is up to 6 or 7.
4. An operator that has only one operand is called a unique operator.
Copyright Cengage Learning. Powered by Cognero.
5. If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right.
6. A mixed arithmetic expression contains all operands of the same type.
7. Suppose a = 5. After the execution of the statement ++a; the value of a is 6.
8. The escape sequence \r moves the insertion point to the beginning of the next line.
Copyright Cengage Learning. Powered by Cognero.
21. The expression static_cast<int>(6.9) + static_cast<int>(7.9) evaluates to ____.
22. The length of the string “computer science” is ____.
23. 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, ____.
24. Suppose that count is an int variable and count = 1. After the statement count++; executes, the value of
count is ____.
Copyright Cengage Learning. Powered by Cognero.
25. Suppose that alpha and beta are int variables. The statement alpha = –beta; is equivalent to the
statement(s) ____.
beta = beta – 1;
alpha = beta;
alpha = beta;
beta = beta – 1;
26. Suppose that alpha and beta are int variables. The statement alpha = beta–; is equivalent to the
statement(s) ____.
beta = beta – 1;
alpha = beta;
alpha = beta;
beta = beta – 1;
27. Suppose that alpha and beta are int variables. The statement alpha = beta++; is equivalent to the
statement(s) ____.
Copyright Cengage Learning. Powered by Cognero.
alpha = beta;
beta = beta + 1;
beta = beta + 1;
alpha = beta;
28. Suppose that alpha and beta are int variables. The statement alpha = ++beta; is equivalent to the
statement(s) ____.
beta = beta + 1;
alpha = beta;
alpha = beta;
beta = beta + 1;
29. Choose the output of the following C++ statement:
cout << “Sunny ” << ‘\n’ << “Day ” << endl;
Copyright Cengage Learning. Powered by Cognero.
33. The declaration int a, b, c; is equivalent to which of the following?
34. Suppose that alpha and beta are int variables and alpha = 5 and beta = 10. After the statement alpha
*= beta; executes, ____.
35. Suppose that sum and num are int variables and sum = 5 and num = 10. After the statement sum += num
executes, ____.
36. ____________________ is the process of planning and creating a program.
37. A(n) ____________________ is a memory location whose contents can be changed.
38. A(n) ____________________ is a collection of statements, and when it is activated, or executed, it accomplishes
something.
subprogram
sub program
sub-program
function
module
39. ____________________ functions are those that have already been written and are provided as part of the system.
Predefined
predefined
Standard
standard
Copyright Cengage Learning. Powered by Cognero.
40. ____________________ rules determine the meaning of instructions.
41. ____________________ can be used to identify the authors of the program, give the date when the program is written
or modified, give a brief explanation of the program, and explain the meaning of key statements in a program.
42. The smallest individual unit of a program written in any language is called a(n) ____________________.
43. In a C++ program, ____________________ are used to separate special symbols, reserved words, and identifiers.
whitespaces
whitespace
white spaces
white space
44. The ____________________ type is C++ ’s method for allowing programmers to create their own simple data types.
Copyright Cengage Learning. Powered by Cognero.
45. The memory space for a(n) ____________________ data value is 64 bytes.
46. The maximum number of significant digits is called the ____________________.
47. When a value of one data type is automatically changed to another data type, a(n) ____________________ type
coercion is said to have occurred.
48. A(n) ____________________ is a sequence of zero or more characters.