Professional Documents
Culture Documents
Solution manual:
https://testbankpack.com/p/solution-manual-for-c-programming-
from-problem-analysis-to-program-design-6th-edition-by-malik-
isbn-1133626386-9781133626381/
TRUE/FALSE
2. The maximum number of significant digits in values of the double type is 15.
5. If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right.
8. The escape sequence \r moves the insertion point to the beginning of the next line.
10. Suppose that sum is an int variable. The statement sum += 7; is equivalent to the statement sum
= sum + 7;
MULTIPLE CHOICE
1. The rules of a programming language tell you which statements are legal, or accepted by the
programming language.
a. semantic c. syntax
b. logical d. grammatical
ANS: C PTS: 1 REF: 34
14. Suppose that count is an int variable and count = 1. After the statement count++; executes,
the value of count is .
a. 1 c. 3
b. 2 d. 4
ANS: B PTS: 1 REF: 70
15. Suppose that alpha and beta are int variables. The statement alpha = --beta; is equivalent
to the statement(s) .
a. alpha = 1 - beta;
b. alpha = beta - 1;
c. beta = beta - 1;
alpha = beta;
d. alpha = beta;
beta = beta - 1;
16. Suppose that alpha and beta are int variables. The statement alpha = beta--; is equivalent
to the statement(s) .
a. alpha = 1 - beta;
b. alpha = beta - 1;
c. beta = beta - 1;
alpha = beta;
d. alpha = beta;
beta = beta - 1;
ANS: D PTS: 1 REF: 70-71
17. Suppose that alpha and beta are int variables. The statement alpha = beta++; is equivalent
to the statement(s) .
a. alpha = 1 + beta;
b. alpha = alpha + beta;
c. alpha = beta;
beta = beta + 1;
d. beta = beta + 1;
alpha = beta;
ANS: C PTS: 1 REF: 70-71
18. Suppose that alpha and beta are int variables. The statement alpha = ++beta; is equivalent
to the statement(s) .
a. beta = beta + 1;
alpha = beta;
b. alpha = beta;
beta = beta + 1;
c. alpha = alpha + beta;
d. alpha = beta + 1;
ANS: A PTS: 1 REF: 70-71
// Insertion Point 1
int main()
{
//Insertion Point 2
float r = 2.0;
float area;
area = PI * r * r;
22. are executable statements that inform the user what to do.
a. Variables c. Named constants
b. Prompt lines d. Expressions
ANS: B PTS: 1 REF: 91
24. Suppose that alpha and beta are int variables and alpha = 5 and beta = 10. After the
statement alpha *= beta; executes, .
a. alpha = 5 c. alpha = 50
b. alpha = 10 d. alpha = 50.0
ANS: C PTS: 1 REF: 94
25. Suppose that sum and num are int variables and sum = 5 and num = 10. After the statement
sum += num executes, .
a. sum = 0 c. sum = 10
b. sum = 5 d. sum = 15
ANS: D PTS: 1 REF: 95
COMPLETION
ANS:
Programming
programming
PTS: 1 REF: 28
PTS: 1 REF: 33
ANS:
subprogram
sub program
sub-program
function
modlue
PTS: 1 REF: 34
4. functions are those that have already been written and are provided as part
of the system.
ANS:
Predefined
predefined
Standard
standard
PTS: 1 REF: 34
ANS:
Semantic
semantic
PTS: 1 REF: 34
6. 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.
ANS:
Comments
comments
PTS: 1 REF: 34
7. The smallest individual unit of a program written in any language is called a(n)
.
ANS: token
PTS: 1 REF: 35
ANS:
whitespaces
whitespace
white spaces
white space
PTS: 1 REF: 37
ANS: enumeration
PTS: 1 REF: 38
PTS: 1 REF: 39
. ANS: precision
PTS: 1 REF: 42
12. When a value of one data type is automatically changed to another data type, a(n)
type coercion is said to have occurred.
ANS: implicit
PTS: 1 REF: 51
PTS: 1 REF: 53
14. In C++, you can use a(n) to instruct a program to mark those
memory locations in which data is fixed throughout program execution.
ANS:
named constant
constant
PTS: 1 REF: 55
15. A data type is called if the variable or named constant of that type can
store only one value at a time.
ANS: simple
PTS: 1 REF: 57
Another random document with
no related content on Scribd:
British property should be paid, and threatening, if further piracies
were committed, to send a force into the Rif to chastise his rebellious
subjects.
No attention was paid to this edict, for though the Rifians
acknowledge the Sultan of Morocco as ‘Kaliph[24] Allah,’ H.M. being
a direct descendant from the Prophet, and though they allow a
governor of Rif extraction to be appointed by him to reside amongst
them, they do not admit of his interference in the administration of
government or in any kind of legislation, unless it happens he is
voluntarily appealed to in cases of dispute.
The Rifians, however, pay annually a small tribute, which is
generally composed of mules and honey, the latter article being
much cultivated on the extensive tracts of heather in the Rif
mountains. This tribute is collected by the Governor and transmitted
to the Sultan.
After a lengthened correspondence with the Moorish Court,
negotiations were closed by the Sultan declaring he had no power of
control over the mountainous districts in the Rif, and therefore
declining to be held responsible for the depredations committed on
vessels approaching that coast. The British Government then
dispatched a squadron to Gibraltar under Admiral Sir Charles Napier,
with orders to embark a regiment at that garrison, and to proceed to
the Rif coast to chastise the lawless inhabitants.
On his arrival at the Spanish fort of Melilla, which is about fifty
miles to the westward of the Algerian frontier, Sir Charles called on
the Spanish Governor and requested him to invite the chiefs of the
neighbouring villages to come to Melilla to meet him.
On their arrival, the Admiral demanded compensation for the
losses sustained by the owner of the British vessels which had been
captured. The Rifians cunningly evaded discussion by replying that
they could not accede to demands which did not emanate from the
Sultan, whose orders they declared they would be prepared to obey.
It was amongst these wild and lawless Rifians that Mr. Hay found
the most thorough sportsmen, and also men capable of great
attachment and devotion. Always much interested in the history of
this race, in their customs and mode of life, he wrote an interesting
account of the tribes which inhabit the north of Morocco and of his
personal intercourse with them.