answers A+ rated
Consider the following correct segment of a correct C program:
p=2;
while (p < 2000) {
p = 2 * p;
}
What is the out put?
1024
1023
2047
2048 - correct answer ✔✔2048
A continue statement can never appear in the else part of an if statement.
True or False? - correct answer ✔✔False
What is not a motivation for functionalizing a program?
1. Execution performance--functionalized programs run faster.
2. Avoid repeating code.
3. Software reusability--using existing code blocks to create new programs.
4. The divide-and-conquer approach makes development more manageable. - correct answer
✔✔1. Execution performance--functionalized programs run faster.
, The comma operator is most often used in ___________ statements.
for
while
do...while
if...else - correct answer ✔✔for
A programmer intentionally creates a for-loop with the following for header:
for ( ; ; )
The programmer's intent was most likely to create
1. an infinite loop
2. a syntax error
3. a logic error
4. a divide-by-zero error - correct answer ✔✔1. an infinite loop
Which statement is true?
1. The boss function normally knows when a worker function calls another function.
2. The boss function has to call other worker functions
3. "Hiding" of implementation details makes it difficult to understand software.
4. The boss function is normally unaware when a worker function calls another function. -
correct answer ✔✔4. The boss function is normally unaware when a worker function calls
another function.
Repetition of a set of instructions a specific number of times is called sentinel-controlled
repetition.
True or False? - correct answer ✔✔False
When a called function completes its task, it normally