Professional Documents
Culture Documents
Code Design
Question 1 of 20
B.selection
C.conditional
D.loop
Question 2 of 20
Which of the following statements describes the flowchart symbol shown below?
Question 3 of 20
Which of the following variable name is the most retable and maintainable
A.employeeLastName
B.lastNameOfTheEmployeeInQuestion
C.emlstnam
D.last name
Question 4 of 20
True
False
Question 5 of 20
Which of the following flowcharts illustrates a while repetition structure in the control
structure of programs?
A.Image d)
B.Image c)
C.Image b)
D.Image a)
Question 6 of 20
As much as __________ percent of the total lifetime cost for an application program is for
maintenance
A.50%
B.75%
C.60%
D.40%
Question 7 of 20
When a program repeats a portion of software code as long as a certain condition doesnt exist,
its using a(n) _______ structure
A.do until
B.what-if
C.if-then-else
D.do while
Question 8 of 20
What are the three control structures for creating programs in structured programming?
A.Repetition, sequence, and selection
Question 9 of 20
When the expression 1-1/x+1/x^2 -1/x^3 +1/x^4 -1/x^n is calculated, which of the following
A.a)
B.b)
C.c)
D.d)
Question 10 of 20
C.Use actual mathematical symbols or the words for the symbols (+, -, *, /)
Question 11 of 20
Please select the best variable name for an employee's last name
A.empLstNm
B.empLastName
C.emplastname
D.lastNameOfTheEmployeeInQuestion
Question 12 of 20
Flowcharts and pseudocode are examples of tools used in the program __________ phase.
A.code
B.specification
C.test
D.design
Question 13 of 20
Question 14 of 20
In a(n) __________ structure, one statement follows the other with no conditions having to be
met.
A.sequence
B.loop
C.conditional
D.selection
Question 15 of 20
Which of the following lines of code comes from a first generation computer language?
A.00010 1010 1101 0001 1010
D.ADD255(3,10),02B(4,5)
Question 16 of 20
The control structure used to perform a series of statements one after the other is called
A.random
B.selection
C.sequential
D.loop
Question 17 of 20
B.Iteration
C.Selection
D.Repetition
Question 18 of 20
Software that helps programmers prepare reports, draw flowcharts, and generate software code
for prototypes is a(n)
A.CLOC (computer licensed operations code) tool
Question 19 of 20
C.keyword statements
D.hexadecimal numbers
Question 20 of 20
"Which of the following is the appropriate basic structure in a flowchart for working out the sum
from 1 to 10 using the sequence below?
Assign the initial value 0 to x
Assign the initial value 1 to i
End when i is greater that 10
If i is 10 or smaller, add i to x, and substitute that value for x
Add 1 to i, and substitute that value for i
Return to "
A.a) Sequence structure
Part 1 of 1 -
Code Design
Question 1 of 20
Software that helps programmers prepare reports, draw flowcharts, and generate software code
for prototypes is a(n)
A.CAUSE (computer assisted Unix software environment) tool
Question 2 of 20
The function f(x) has real arguments and returned values. Consider the procedure consisting of
steps 1 ~5 as shown below using this function. After starting execution and repeating the
procedure a sufficient number of times, y in step 3 stops changing. Which of the following
expressions holds at this point?
A.f(y)=0
B.f(y)=y
C.f(a)=y
D.f(y)=a
Question 3 of 20
Which of the following statements describes the flowchart symbol shown below?
Question 4 of 20
What can we do with the Circle symbol when drawing the flowchart to represent the algorithm?
A.Use it to represent a point at which the flowchart connects with another process. The
name or reference for the other process should appear within the symbol
B.Use it to represent a decision point in the process. Typically, the statement in the symbol
will require a `yes' or `no' response and branch to different parts of the flowchart accordingly
C.Use it to represent an event which is controlled within the process. Typically this will be
a step or action which is taken. In most flowcharts this will be the most frequently used symbol
D.Use it to represent an event which occurs automatically. Such an event will trigger a
subsequent action, for example `receive telephone call, or describe a new state of affairs.
Question 5 of 20
Please select the best variable name for an employee's last name
A.empLstNm
B.empLastName
C.emplastname
D.lastNameOfTheEmployeeInQuestion
Question 6 of 20
The flowchart below shows a binary search algorithm to find the index m of the array element
A(m), such that the equation A(m) = k holds, from the array elements A(1), A(2), , A(n)
already sorted in ascending order. In case of m= 0 at the end, there is no element such that the
equation A(m) = k holds. Which of the following is inserted in the process box X in the
flowchart? Here, the slash ( / ) indicates division that truncates all digits after the decimal point.
A.(x+ y) m
B.(x y) / 2 m
C.(y x) / 2 m
D.(x+ y) / 2 m
Question 7 of 20
Which of the following refers to tools that are used to design, code, and test software?
A.CAD
B.CASE
C.OOP
D.XML
Question 8 of 20
B.Sequence
C.Selection
D.Iteration
Question 9 of 20
Question 10 of 20
"
B.To store the reference data
When the expression 1-1/x+1/x^2 -1/x^3 +1/x^4 -1/x^n is calculated, which of the following
should be inserted in the process box in the flowchart shown below?
A.d)
B.a)
C.c)
D.b)
Question 12 of 20
B.loop
C.conditional
D.selection
Question 13 of 20
B.Sequence
C.Repetition
D.Subprogram
Question 14 of 20
"The test data about the part of a program shown in the flowchart is specified by decision
condition coverage (branch coverage). If this test data is specified by multiple condition
coverage, which of the following is the appropriate data to add? Here, the part enclosed in
Question 15 of 20
The programming tool that uses linked symbols to show the sequence of steps needed to solve a
programming problem
A.grid table
B.algorithm
C.pseudocode
D.flowchart
Question 16 of 20
D.Use actual mathematical symbols or the words for the symbols (+, -, *, /)
Question 17 of 20
When a program whose functions are as shown in the flowchart in the Figure 1 was executed
when the contents of array A were as given in Figure 2, array B, whose contents are shown in the
Figure 3, was produced. Which operation should be filled in a of Figure 1? Here, the element of
arrays A and B are represented by A(i, j) and B(i, j), respectively.
A.A (i,j) --> B (7-j, i)
Question 18 of 20
B.Natural
C.Assembly
D.Procedural
Question 19 of 20
A program error that violates the grammar rules of the programming language is a(n) _______
error
A.modular
B.logic
C.language
D.syntax
Question 20 of 20
In a(n) __________ structure, one statement follows the other with no conditions having to be
met.
A.selection
B.loop
C.sequence
D.conditional
Part 1 of 1 -
Code Design
Question 1 of 20
As much as __________ percent of the total lifetime cost for an application program is for
maintenance
A.60%
B.75%
C.50%
D.40%
Question 2 of 20
When a program repeats a portion of software code as long as a certain condition doesnt exist,
its using a(n) _______ structure
A.do while
B.what-if
C.do until
D.if-then-else
Question 3 of 20
B.keyword statements
C.hexadecimal numbers
Question 4 of 20
Integers are stored in the 1st to N-th elements of an array A(N>1). The flowchart below shows
the process to check which element of the array contains the same value as X. Which of the
following correctly describes the execution result of this process?
C.If the same value as X exists in two places of the array, the 1st and N-th elements, k is
set to 1.
D.If the same value as X exists in two places of the array, the 1st and N-th elements, k is
set to N.
Question 5 of 20
B.Sequence
C.Repetition
D.Subprogram
Question 6 of 20
D.Use actual mathematical symbols or the words for the symbols (+, -, *, /)
Question 7 of 20
Which of the following flowcharts illustrates a while repetition structure in the control
structure of programs?
A.Image d)
B.Image c)
C.Image a)
D.Image b)
Question 8 of 20
C.Formal parameters are the one that appear when a submodule is defined
D.Value parameter pass the memory address of a parameter from one module to another
Question 9 of 20
What can we do with the Circle symbol when drawing the flowchart to represent the algorithm?
A.Use it to represent a point at which the flowchart connects with another process. The
name or reference for the other process should appear within the symbol
B.Use it to represent a decision point in the process. Typically, the statement in the symbol
will require a `yes' or `no' response and branch to different parts of the flowchart accordingly
C.Use it to represent an event which is controlled within the process. Typically this will be
a step or action which is taken. In most flowcharts this will be the most frequently used symbol
D.Use it to represent an event which occurs automatically. Such an event will trigger a
subsequent action, for example `receive telephone call, or describe a new state of affairs.
Question 10 of 20
B.loop
C.conditional
D.selection
Question 11 of 20
When the expression 1-1/x+1/x^2 -1/x^3 +1/x^4 -1/x^n is calculated, which of the following
should be inserted in the process box in the flowchart shown below?
A.d)
B.a)
C.c)
D.b)
Question 12 of 20
Question 13 of 20
Which of the following is the correct result produced by executing the program shown below?
Here, the parameter x is called by value, and the parameter y is called by reference.
A.a= 7, b= 5
B.a= 2, b= 3
C.a= 2, b= 5
D.a= 7, b= 3
Question 14 of 20
Flowcharts and pseudocode are examples of tools used in the program __________ phase.
A.design
B.test
C.code
D.specification
Question 15 of 20
B.well-documented
C.colorful graphics
D.reliability
Question 16 of 20
B.Natural
C.Assembly
D.Procedural
Question 17 of 20
The programming tool that uses linked symbols to show the sequence of steps needed to solve a
programming problem
A.grid table
B.algorithm
C.pseudocode
D.flowchart
Question 18 of 20
A program error that violates the grammar rules of the programming language is a(n) _______
error
A.modular
B.logic
C.language
D.syntax
Question 19 of 20
Please select the best variable name for an employee's last name
A.empLstNm
B.empLastName
C.emplastname
D.lastNameOfTheEmployeeInQuestion
Question 20 of 20
"The test data about the part of a program shown in the flowchart is specified by decision
condition coverage (branch coverage). If this test data is specified by multiple condition
coverage, which of the following is the appropriate data to add? Here, the part enclosed in
____HCMUT_013_CSD_02_Quiz1_Code Design
Return to Assessment List
Part 1 of 1 Code Design
Question 1 of 20
What can we do with the Circle symbol when drawing the flowchart to represent the algorithm?
A.Use it to represent a decision point in the process. Typically, the statement in the symbol
will require a `yes' or `no' response and branch to different parts of the flowchart accordingly
B.Use it to represent an event which occurs automatically. Such an event will trigger a
subsequent action, for example `receive telephone call, or describe a new state of affairs.
C.Use it to represent a point at which the flowchart connects with another process. The
name or reference for the other process should appear within the symbol
D.Use it to represent an event which is controlled within the process. Typically this will be
a step or action which is taken. In most flowcharts this will be the most frequently used symbol
Question 2 of 20
"The test data about the part of a program shown in the flowchart is specified by decision
condition coverage (branch coverage). If this test data is specified by multiple condition
coverage, which of the following is the appropriate data to add? Here, the part enclosed in
Question 3 of 20
B.selection
C.sequence
D.conditional
Question 4 of 20
A(n) __________ error could be the result of the programmer making an incorrect calculation
A.syntax
B.logic
C.general protection
D.breakpoint
Question 5 of 20
When a program repeats a portion of software code as long as a certain condition doesnt exist,
its using a(n) _______ structure
A.do until
B.do while
C.what-if
D.if-then-else
Question 6 of 20
Which of the following statements describes the flowchart symbol shown below?
The control structure used to perform a series of statements one after the other is called
A.random
B.loop
C.sequential
D.selection
Question 8 of 20
The flowchart below shows a binary search algorithm to find the index m of the array element
A(m), such that the equation A(m) = k holds, from the array elements A(1), A(2), , A(n)
already sorted in ascending order. In case of m= 0 at the end, there is no element such that the
equation A(m) = k holds. Which of the following is inserted in the process box X in the
flowchart? Here, the slash ( / ) indicates division that truncates all digits after the decimal point.
A.(y x) / 2 m
B.(x+ y) / 2 m
C.(x+ y) m
D.(x y) / 2 m
Question 9 of 20
Flowcharts and pseudocode are examples of tools used in the program __________ phase.
A.code
B.design
C.test
D.specification
Question 10 of 20
Which of the following is the correct result produced by executing the program shown below?
Here, the parameter x is called by value, and the parameter y is called by reference.
A.a= 2, b= 5
B.a= 7, b= 5
C.a= 2, b= 3
D.a= 7, b= 3
Question 11 of 20
Which of the following variable name is the most retable and maintainable
A.employeeLastName
B.emlstnam
C.last name
D.lastNameOfTheEmployeeInQuestion
Question 12 of 20
Which of the following flowcharts illustrates a while repetition structure in the control
structure of programs?
A.Image c)
B.Image b)
C.Image a)
D.Image d)
Question 13 of 20
There are two important operations on a stack: PUSH and POP. PUSH adds the new data to the
top of the stack leaving previous data below, and POP removes and returns the current top data
of the stack. When the operations shown below are sequentially executed, which of the
following is the correct combination of the values x and y? Here, the size of the stack is big
enough to hold the entire data. PUSH(a) inserts the data a into the stack, and POP(b)
removes the data b from the stack.
[Operations] PUSH (5); PUSH (3); PUSH (6); PUSH (1); x= POP ( ); PUSH (7); y= POP ( );
A.x=1, y=6
B.x=1, y=7
C.x=5, y=7
D.x=5, y=3
Question 14 of 20
Question 15 of 20
Please select one item which is not a guide when writing pseudo code
A.Structural elements might come separately
Question 16 of 20
In a(n) __________ structure, one statement follows the other with no conditions having to be
met.
A.sequence
B.loop
C.selection
D.conditional
Question 17 of 20
"Which of the following is the appropriate basic structure in a flowchart for working out the sum
from 1 to 10 using the sequence below?
Assign the initial value 0 to x
Assign the initial value 1 to i
End when i is greater that 10
If i is 10 or smaller, add i to x, and substitute that value for x
Add 1 to i, and substitute that value for i
Return to "
A.c) Conditional branch
Question 18 of 20
B.Assembly
C.Procedural
D.Natural
Question 19 of 20
B.colorful graphics
D.well-documented
Question 20 of 20
__________ refers to testing by a select group of potential users in the final stage of testing a
program
A.Beta testing
B.Manual testing
C.Desk checking
D.Attempt at translation
Part 1 of 1 -
Code Design
Question 1 of 20
True
False
As much as __________ percent of the total lifetime cost for an application program
is for maintenance
A.50%
B.75%
C.60%
D.40%
Question 3 of 20
Which of the following statements describes the flowchart symbol shown below?
Question 4 of 20
A.conditional
B.loop
C.sequence
D.selection
Question 5 of 20
In below definitions on the global data, which one is incorrect?
Question 6 of 20
What are the three control structures for creating programs in structured
programming?
Question 7 of 20
A.Each set of instructions is written from top to bottom, with only one entry
and one exit
Question 8 of 20
A.do until
B.what-if
C.if-then-else
D.do while
Question 9 of 20
A.Image d)
B.Image c)
C.Image b)
D.Image a)
Question 10 of 20
Which of the following lines of code comes from a first generation computer
language?
D.ADD255(3,10),02B(4,5)
Question 11 of 20
A.unit
B.object
C.component
D.Module
Question 12 of 20
A program error that violates the grammar rules of the programming language is
a(n) _______ error
A.language
B.logic
C.modular
D.syntax
Question 13 of 20
What can we do with the Circle symbol when drawing the flowchart to represent the
algorithm?
Question 14 of 20
The programming tool that uses linked symbols to show the sequence of steps
needed to solve a programming problem
A.pseudocode
B.algorithm
C.grid table
D.flowchart
Question 15 of 20
C.Use actual mathematical symbols or the words for the symbols (+, -, *, /)
Question 16 of 20
A.Value parameter pass the memory address of a parameter from one module
to another
B.Formal parameters are the one that appear when a submodule is defined
Question 17 of 20
When develop the outline into an algorithm, which tools can we use to represent
the solution algorithm?
A. Flowchart
B. Pseudo code
C. Sequence diagram
Question 18 of 20
When a program whose functions are as shown in the flowchart in the Figure 1 was
executed when the contents of array A were as given in Figure 2, array B, whose
contents are shown in the Figure 3, was produced. Which operation should be filled
in a of Figure 1? Here, the element of arrays A and B are represented by A(i, j) and
B(i, j), respectively.
Question 19 of 20
Please select the best variable name for an employee's last name
A.empLstNm
B.empLastName
C.emplastname
D.lastNameOfTheEmployeeInQuestion
Question 20 of 20
Question 16 of 20
As much as __________ percent of the total lifetime cost for an application program is for maintenance
A.75%
B.60%
C.40%
D.50%