C173 with C173 Pre-Assessment Practice Questions with
verified answers
- Ans✓✓✓-subtract
... Ans✓✓✓-...
* Ans✓✓✓-multiply
/ Ans✓✓✓-divide
^^ != Ans✓✓✓-Not equal to
^^ % Ans✓✓✓-Division and returns the remainder, Modulos
^^ A company has a new project it wishes to implement to track and analyze
employee and customer interactions. The company leadership determines that
the system should support direct data entry as well as automated data capture of
phone calls and emails.
Which phase of the waterfall process is occurring?
A Analysis
B Design
C Implementation
,D Testing Ans✓✓✓-Analysis
^^ A language substantially supports a programmer creating items like person,
teacher, and students. Each item has internal data and some operations.
Which characteristic describes that language?
A Dynamically typed
B Object-oriented
C Markup
D Statically typed Ans✓✓✓-Object-oriented
^^ A mark-up language is Ans✓✓✓-used to describe content
^^ A program determines if a user's age is high enough to run for U.S. president.
The minimum age requirement is 35. How should the item that holds the
minimum age be declared? Constant integer minAge, Variable integer minAge,
Constant integer 35, Variable integer 35 Ans✓✓✓-Constant integer minAge
^^ A program first assigns userNum with a value read from user input. The
program outputs the value of userNum and adds 1 to userNum. Then, if userNum
is less than 100, the program repeats, outputting the value of userNum and
adding 1 to userNum. Which control structure should be used?
while loop
for loop
,do-while loop Ans✓✓✓-do-while loop. A do-while loop executes the loop body's
statements, then checks the loop's condition. For this program, the loop body's
statements include outputting the value of userNum and adding 1 to userNum.
^^ A program should continue getting an input value, and converting that value
from pounds to kilograms, until the input is zero. Which control structure should
be used?
if statement
while loop
for loop Ans✓✓✓-while loop. A while loop is used when the number of iterations
is not computable before the loop. The number of iterations for this program is
not computable because the number of iterations depends on the user input.
^^ A program should output even numbers from 2 to 50. Which control structure
should be used?
if statement
while loop
for loop Ans✓✓✓-for loop. The number of iterations is computable before the
loop executes, so a for loop can be used to iterate the fixed number of times.
^^ A program uses the number of seconds in a minute in various calculations.
How should the item that holds the number of seconds in a minute be declared?
Constant float userTime, Variable float userTime, Constant integer
secondsPerMinute, Variable integer secondsPerMinute, Ans✓✓✓-Constant
integer secondsPerMinute
^^ A programmer decides a program should convert U.S. units to metric units and
decides to write the program in C++ using several functions.
, Which phase of a waterfall approach is occurring when the programmer starts
writing the program?
A Analysis
B Design
C Implementation
D Testing Ans✓✓✓-Implementation
^^ A programmer wants a compiler to report an error if an integer variable is
assigned with a string.
Which kind of language should the programmer use?
A Dynamically typed
B Object-oriented
C Markup
D Statically typed Ans✓✓✓-Statically typed
^^ A sequence diagram always indicates order of events. True or False Ans✓✓✓-
True. Time passes from top to bottom in the diagram, allowing the ordering of
events to be determined from the diagram.
^^ A UML class diagram can depict if a class has data members of another class
type. True or False Ans✓✓✓-True. An unfilled diamond and a line connecting two
classes indicates one class has data members of another class type.