• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 25 pages
Exam (elaborations)

ENGR 200 MIDTERM EXAM QUESTIONS WITH ANSWERS AND EXPLANATIONS | American Public University

Document preview thumbnail
Preview 3 out of 25 pages

ENGR 200 MIDTERM EXAM QUESTIONS WITH ANSWERS AND EXPLANATIONS | American Public University

Content preview

ENGR 200 MIDTERM EXAM QUESTIONS WITH
ANSWERS AND EXPLANATIONS
| American Public University
1. Which description would an engineer accept for char type?
A. a floating-point type used for values that may require fractional parts
B. a type whose logical values are true and false
C. a character type that can represent a single character code
D. an integral type commonly used for whole-number values
Correct Answer: C. a character type that can represent a single character code
Explanation: char type is a character type that can represent a single character code.

2. Which interpretation better fits The negation of (a && b) is logically equivalent to (!a || !b). than an account
centered on logical AND?
A. the use of == to test whether two values are equal
B. the && operator that is true only when both operands are true
C. a multiway selection that chooses among labeled cases based on an integral or enumeration expression
D. the equivalence that negating a conjunction becomes a disjunction of negations and vice versa
Correct Answer: D. the equivalence that negating a conjunction becomes a disjunction of negations and vice versa
Explanation: The case follows De Morgan transformation (the equivalence that negating a conjunction becomes a
disjunction of negations and vice versa) rather than logical AND (the && operator that is true only when both operands
are true).

3. Identify the concept that means the use of an input stream such as std::cin to read formatted values from the
console.
A. standard input
B. initialization
C. remainder operator
D. char type
Correct Answer: A. standard input
Explanation: standard input refers to the use of an input stream such as std::cin to read formatted values from the
console.

4. A program executes if (x > 12) cout << "HIGH"; else cout << "OK";. If x = 16, what is printed?
A. Nothing
B. OK
C. HIGH
D. Both words
Correct Answer: C. HIGH
Explanation: The condition is true, so the selected branch prints HIGH.

,5. Someone has confused scope with another concept by writing 'the = operator that stores a new value into an
existing modifiable object'. What is the correct definition?
A. a character type that can represent a single character code
B. the region of a program in which a declared name can be referred to
C. the = operator that stores a new value into an existing modifiable object
D. the use of an input stream such as std::cin to read formatted values from the console
Correct Answer: B. the region of a program in which a declared name can be referred to
Explanation: The correction is that scope is the region of a program in which a declared name can be referred to. The
mistaken wording instead describes assignment operator.

6. A student defines sentinel-controlled loop as 'a jump statement that terminates the nearest enclosing loop or
switch'. Which revision corrects the error?
A. a loop error that performs one iteration too many or too few because of incorrect bounds
B. a jump statement that terminates the nearest enclosing loop or switch
C. repetition that ends when a special input value signals termination
D. a repetition structure in which one loop is contained inside another
Correct Answer: C. repetition that ends when a special input value signals termination
Explanation: The correction is that sentinel-controlled loop is repetition that ends when a special input value signals
termination. The mistaken wording instead describes break statement.

7. While reviewing introductory C++ code, which action or observation would best demonstrate comment?
A. A counter is created with the value zero before it is used in an accumulation loop.
B. A line beginning with // explains why a conversion factor is used.
C. A program computes power from voltage and current using multiplication.
D. An assignment ending with a semicolon changes the value stored in a variable.
Correct Answer: B. A line beginning with // explains why a conversion factor is used.
Explanation: The selected observation most specifically demonstrates comment: source text intended for human
readers and ignored as executable program logic.

8. The statement 'equality comparison means a case located at or immediately adjacent to a limit where inclusive
and exclusive comparisons matter' is inaccurate. Which replacement is best?
A. the equivalence that negating a conjunction becomes a disjunction of negations and vice versa
B. the && operator that is true only when both operands are true
C. a case located at or immediately adjacent to a limit where inclusive and exclusive comparisons matter
D. the use of == to test whether two values are equal
Correct Answer: D. the use of == to test whether two values are equal
Explanation: The correction is that equality comparison is the use of == to test whether two values are equal. The
mistaken wording instead describes boundary condition.

, 9. Compare these cases: A measured voltage of 3.275 is stored in a double rather than an integer. Separately, A
loop counter that takes values 0, 1, 2, and so on is stored in an integer variable. Which paired explanation is most
accurate?
A. The first reflects int type; the second reflects double type.
B. Both are best explained by double type.
C. Neither observation can be classified using an engineering or computing concept.
D. The first reflects double type; the second reflects int type.
Correct Answer: D. The first reflects double type; the second reflects int type.
Explanation: The first observation matches double type, whereas the second matches int type. The two should not be
collapsed into one concept.

10. Consider two independent findings. Finding A: Each recursive call creates another active frame until the base
case is reached. Finding B: A formatting function uses a default precision unless the caller specifies another one.
Which conclusion correctly assigns a concept to each?
A. The first reflects default argument; the second reflects call stack.
B. The first reflects call stack; the second reflects default argument.
C. Neither observation can be classified using an engineering or computing concept.
D. Both are best explained by call stack.
Correct Answer: B. The first reflects call stack; the second reflects default argument.
Explanation: The first observation matches call stack, whereas the second matches default argument. The two should
not be collapsed into one concept.

11. Which option repairs the conceptual error in defining variable as 'a named scope used to organize identifiers
and reduce naming conflicts'?
A. the use of an output stream such as std::cout to send formatted text or values to a console
B. the % operator that produces the remainder from integral division
C. a named storage location whose value can change while a program executes
D. a named scope used to organize identifiers and reduce naming conflicts
Correct Answer: C. a named storage location whose value can change while a program executes
Explanation: The correction is that variable is a named storage location whose value can change while a program
executes. The mistaken wording instead describes namespace.

12. While tracing a repeated computation: The index changes each pass so the algorithm visits a different array
element. Which concept is most directly illustrated?
A. pretest loop
B. accumulator
C. iteration variable
D. sentinel-controlled loop
Correct Answer: C. iteration variable
Explanation: The situation is a direct example of iteration variable, which is a variable whose successive values
determine the progress of a repeated computation.

Document information

Uploaded on
September 29, 2026
Number of pages
25
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$14.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Favorgrades
3.8
(197)
Sold
843
Followers
377
Items
57675
Last sold
3 hours ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions