Logic Final Review Flashcards

(90 cards)

1
Q

Which loop statement does not contain an increment statement but automatically increments the counter at the end of each iteration?

A

For

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which symbol is used for an assignment statement in a flowchart?

A

processing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The value of the expression 12 - 4 * 3 / 2 + 9 is

A

15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What term is used for a string that appears in the actual code of a program?

A

string literal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The _____ symbol indicates that some condition must be tested in a flowchart.

A

diamond

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The program development cycle is made up of ________ steps that are repeated until no errors can be found in the program.

A

5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The term used for a set of rules that must be strictly followed when writing a program is _______.

A

syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The function ________ comprises one or more statements that are executed when the function is called.

A

body

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which function returns a string within a string?

A

substring

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which structure causes a statement or set of statements to execute repeatedly?

A

repetition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which loop is specifically designed to initialize, test, and increment a counter variable

A

For

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

the statements that appear between the While and the End While clauses are called the

A

body of the loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the informal language that programmers use to create models of programs that have no syntax rules?

A

pseudocode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In many languages the case structure is called a _____ statement

A

selective

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Passing an argument by _________ means that only a copy of the argument’s value is passed into the parameter variable.

A

switch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What type of loop uses a Boolean expression to control the number of times that it repeats a statement of set of statements?

A

condition-controlled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which operator is used to determine that the operands are not exactly of the same value? =, !, =!, ==, none of these

A

none of these; this is used !=

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What function(s) does an interpreter perform w/ the instructions in a high-level programming language?

A

translates and executes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What type of operator can be used to determine whether a specific relationship exists between two values?

A

relational

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Which of these are posttest loops?

A

Do-While and Do-Until

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Which error produces incorrect results but does not prevent the program from running?

A

logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Which of the following is not an example of operating system software? Microsoft Word, Windows Vista, Linux, Mac OS X, none of these

A

Microsoft Word

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Which of the following is not a benefit of using modules? simpler code, faster development, code reuse, better testing, none of these

A

none of these

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

_____ was the first high-level programming language designed that could perform complex mathematical calculations.

A

FORTRAN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
The following is an example of what type of statement: set rate = 5.75
assignment
26
Which operator is best to determine whether x contains a value in the range of 10 through 57?
AND
27
Data is not recorded magnetically on a(n) ______, but is encoded as a series of pits on the disk surface.
optical disk
28
A ________ is a module that returns a value back to the part of the program that called it.
function
29
Which type of variable is visible to every module and the entire program?
global
30
The function ______ specifies the return data type, name of function, and the parameter variable(s).
header
31
If the expression is false, the ______ operator will return true.
NOT
32
The smallest storage location in a computer's memory is known as a _______.
bit
33
Modules are commonly called what? | Subprograms, all of these, procedures, subroutines, methods
all
34
What is the term used for the variable that receives an argument that passed into a module?
parameter
35
Function is another name for ________. | module, variable, reference, sub class, none of these
module
36
Which of the following is not a variable data type?
number
37
Which type of variable is not recommended to be used in programs because they make programs hard to understand and debug?
global
38
The term ____ is used to describe any mechanism that accepts input, performs some operation that cannot be seen on the input and produces output.
black box
39
A pass by ________ argument means that the argument is passed into a parameter that will reference the content of the argument in the module.
reference
40
The _____ operator is a unary operator, as it works with only one operand.
NOT
41
The process known as the ______ cycle is used by the CPU to execute instructions in a program.
fetch-decode-execute
42
What is another term used for "desk checking"?
hand tracing
43
which of the following is not an actual programming language? C++, Python, Visual Basic, Pseudocode, Java
pseudocode
44
Which function accepts two strings as arguments, returns "True" if the first string contains the second string, and otherwise returns "False"?
contains
45
What symbol is used to mark the beginning and end of a string?
quotation
46
What is the term used for memory address of the location is the statement immediately after the module call?
return point
47
What is the encoding technique called that is used to store negative numbers in the computer's memory?
twos-compliment
48
Which pair of loops causes a statement or set of statements to repeat as long as a condition is true?
While and Do-While
49
Programs that make a computer useful for everyday tasks are known as_____.
application software
50
A ________ structure is a set of statements that execute in the order they appear.
sequence
51
What is the data type returned by the random library function?
integer
52
What is the largest value that can be stored in one byte?
255
53
Which of the following is optional when writing a function?
none of these
54
To create a module you write its _____.
definition
55
Which computer language uses short words known as mnemonics for writing programs?
assembly
56
In the IPO chart, the _____ column describes the data that is passed to the function as arguments.
input
57
What tool would a programmer use to visualize the relationship between modules?
hierarchy charts
58
What term can be used to describe anything that uses binary numbers?
digital
59
the amount the counter variable is incremented in a For loop is known as what?
step amount
60
A loop that accumulates a total as it reads each number from a series is often said to keep what?
running total
61
Which structure is a logical design that controls the order in which a set of statements executes?
control
62
A(n) _______ is a name that represents a value that cannot be changed during the program's execution.
named constant
63
The ______ coding scheme contains a set of 128 numeric codes that are used to represent characters in a computer's memory.
ASCII
64
In a count-controlle loop, the counter performs ____ actions.
3
65
Random numbers are commonly used in which type of program? | games, data encryption, statistical analysis, simulations, all of these
all
66
Which of the following devices is a computer? | iPods, car navigation systems, blackberries, cell phones, all of these
all
67
What term is used in the ending terminal symbol of a function of a flow chart?
return
68
The _____ is a diagram that graphically depicts the steps that take place in a program.
flowchart
69
A case structure is a _______ alternative decision structure.
multiple
70
Which of the following is not a microprocessor manufacturing company? Intel, Dell, AMD, Motorola
Dell
71
What is the firs step of the program development cycle?
design the program
72
to ________ a variable means to decrease its value.
decrement
73
what phrase is placed in the starting terminal symbol of a module in a flowchart?
name of the module
74
When an argument is passed by _______, it is not affected by a change of the content of the parameter variable.
value
75
What two logical operators perform short-circuit evaluation?
AND and OR
76
Which loop repeats a statement of set of statements as long as a the Boolean expression is false?
Do-Until
77
The process where the programmer steps through each of the program's statements one by one is called.
hand tracing
78
__________ documentation is a reference guide that describes the features of the program, designed for the user.
external
79
the module definition comprises the module header and the module
body
80
A condition is a _________ expression.
Boolean
81
Which of the following operators reverses the logic of its operand?
NOT
82
The _______ operator could be used, in some situations, to simplify nested selection structures.
AND
83
The disk drive is a secondary storage device that stores data by ________ encoding it onto circular disks.
magnetically
84
In a flowchart, the module call is represented by a _________ symbol with vertical bars at each side.
rectangle
85
Which of the following errors occur when a real value is attempted to be assigned to an integer variable?
type mismatch
86
A computer system consists of all of the following except: main memory, operating system, secondary storage devices, CPU, I/O devices
operating system
87
To execute a module we must ______ it.
call
88
_______ variables are useful for establishing two-way communication between modules.
reference
89
The ______ represents a special value that marks the end of a list of values.
sentinel
90
Which of the following is a logical operator? | AND, NOT, OR, all of these, none of these
all