Logic Final Review Flashcards

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
Q

The following is an example of what type of statement: set rate = 5.75

A

assignment

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

Which operator is best to determine whether x contains a value in the range of 10 through 57?

A

AND

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

Data is not recorded magnetically on a(n) ______, but is encoded as a series of pits on the disk surface.

A

optical disk

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

A ________ is a module that returns a value back to the part of the program that called it.

A

function

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

Which type of variable is visible to every module and the entire program?

A

global

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

The function ______ specifies the return data type, name of function, and the parameter variable(s).

A

header

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

If the expression is false, the ______ operator will return true.

A

NOT

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

The smallest storage location in a computer’s memory is known as a _______.

A

bit

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

Modules are commonly called what?

Subprograms, all of these, procedures, subroutines, methods

A

all

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

What is the term used for the variable that receives an argument that passed into a module?

A

parameter

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

Function is another name for ________.

module, variable, reference, sub class, none of these

A

module

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

Which of the following is not a variable data type?

A

number

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

Which type of variable is not recommended to be used in programs because they make programs hard to understand and debug?

A

global

38
Q

The term ____ is used to describe any mechanism that accepts input, performs some operation that cannot be seen on the input and produces output.

A

black box

39
Q

A pass by ________ argument means that the argument is passed into a parameter that will reference the content of the argument in the module.

A

reference

40
Q

The _____ operator is a unary operator, as it works with only one operand.

A

NOT

41
Q

The process known as the ______ cycle is used by the CPU to execute instructions in a program.

A

fetch-decode-execute

42
Q

What is another term used for “desk checking”?

A

hand tracing

43
Q

which of the following is not an actual programming language?
C++, Python, Visual Basic, Pseudocode, Java

A

pseudocode

44
Q

Which function accepts two strings as arguments, returns “True” if the first string contains the second string, and otherwise returns “False”?

A

contains

45
Q

What symbol is used to mark the beginning and end of a string?

A

quotation

46
Q

What is the term used for memory address of the location is the statement immediately after the module call?

A

return point

47
Q

What is the encoding technique called that is used to store negative numbers in the computer’s memory?

A

twos-compliment

48
Q

Which pair of loops causes a statement or set of statements to repeat as long as a condition is true?

A

While and Do-While

49
Q

Programs that make a computer useful for everyday tasks are known as_____.

A

application software

50
Q

A ________ structure is a set of statements that execute in the order they appear.

A

sequence

51
Q

What is the data type returned by the random library function?

A

integer

52
Q

What is the largest value that can be stored in one byte?

A

255

53
Q

Which of the following is optional when writing a function?

A

none of these

54
Q

To create a module you write its _____.

A

definition

55
Q

Which computer language uses short words known as mnemonics for writing programs?

A

assembly

56
Q

In the IPO chart, the _____ column describes the data that is passed to the function as arguments.

A

input

57
Q

What tool would a programmer use to visualize the relationship between modules?

A

hierarchy charts

58
Q

What term can be used to describe anything that uses binary numbers?

A

digital

59
Q

the amount the counter variable is incremented in a For loop is known as what?

A

step amount

60
Q

A loop that accumulates a total as it reads each number from a series is often said to keep what?

A

running total

61
Q

Which structure is a logical design that controls the order in which a set of statements executes?

A

control

62
Q

A(n) _______ is a name that represents a value that cannot be changed during the program’s execution.

A

named constant

63
Q

The ______ coding scheme contains a set of 128 numeric codes that are used to represent characters in a computer’s memory.

A

ASCII

64
Q

In a count-controlle loop, the counter performs ____ actions.

A

3

65
Q

Random numbers are commonly used in which type of program?

games, data encryption, statistical analysis, simulations, all of these

A

all

66
Q

Which of the following devices is a computer?

iPods, car navigation systems, blackberries, cell phones, all of these

A

all

67
Q

What term is used in the ending terminal symbol of a function of a flow chart?

A

return

68
Q

The _____ is a diagram that graphically depicts the steps that take place in a program.

A

flowchart

69
Q

A case structure is a _______ alternative decision structure.

A

multiple

70
Q

Which of the following is not a microprocessor manufacturing company?
Intel, Dell, AMD, Motorola

A

Dell

71
Q

What is the firs step of the program development cycle?

A

design the program

72
Q

to ________ a variable means to decrease its value.

A

decrement

73
Q

what phrase is placed in the starting terminal symbol of a module in a flowchart?

A

name of the module

74
Q

When an argument is passed by _______, it is not affected by a change of the content of the parameter variable.

A

value

75
Q

What two logical operators perform short-circuit evaluation?

A

AND and OR

76
Q

Which loop repeats a statement of set of statements as long as a the Boolean expression is false?

A

Do-Until

77
Q

The process where the programmer steps through each of the program’s statements one by one is called.

A

hand tracing

78
Q

__________ documentation is a reference guide that describes the features of the program, designed for the user.

A

external

79
Q

the module definition comprises the module header and the module

A

body

80
Q

A condition is a _________ expression.

A

Boolean

81
Q

Which of the following operators reverses the logic of its operand?

A

NOT

82
Q

The _______ operator could be used, in some situations, to simplify nested selection structures.

A

AND

83
Q

The disk drive is a secondary storage device that stores data by ________ encoding it onto circular disks.

A

magnetically

84
Q

In a flowchart, the module call is represented by a _________ symbol with vertical bars at each side.

A

rectangle

85
Q

Which of the following errors occur when a real value is attempted to be assigned to an integer variable?

A

type mismatch

86
Q

A computer system consists of all of the following except: main memory, operating system, secondary storage devices, CPU, I/O devices

A

operating system

87
Q

To execute a module we must ______ it.

A

call

88
Q

_______ variables are useful for establishing two-way communication between modules.

A

reference

89
Q

The ______ represents a special value that marks the end of a list of values.

A

sentinel

90
Q

Which of the following is a logical operator?

AND, NOT, OR, all of these, none of these

A

all