Chapter 2

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What is the value of the following expression?

15

What is the value of the following expression?

21

What is the value of the variable result in the following expression?Set result = 6 + 8 * 4 / 2

22

What is the value of the variable result in the following expression?Set result = (6 + 8) * 4 / 2

28

What is the value of the variable result in the following expression?Set result = (6 + 8) / 4 * 2

7

Which of the following would cause an error in a program?

All of these would cause errors

Which of the following is not a variable data type?

Numeral

Which of the following is not an actual programming language?

Pseudocode

________ is the informal language used by programmers to create models of programs.

Pseudocode

What is the error in the following pseudocode? Declare String userDisplay "How many widgets do you want to buy?" Input user

The input is a number, not a string.

The ________ operator is used to raise 5 to the second power.

^

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

a quote mark ( " )

The following is an example of a(n) ________ statement. Set rate = 6.25

assignment

What is the first step of the program development cycle?

design the program

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

five

A(n) ________ is a diagram that graphically depicts the steps that take place in a program.

flowchart

The process of stepping through each of a program's statements, one by one, to see what each statement does is known as ________.

hand tracing

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

logic

A variable declaration typically specifies the variable's ________ and ________.

name, data type

A(n) ________ is a name that represents a value which cannot be changed during the program's execution.

named constant

A(n) ________ symbol is used for an assignment statement in a flowchart.

processing

The ________ structure consists of a set of statements that execute in the order in which they appear.

sequence

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

string literal

What is the error in the following pseudocode? Display "What is your name?" Input userNameDeclare String userName

userName has been used before it is declared.

What is the error in the following pseudocode? Declare Integer widgets Declare Real cost Set widgets = 3.5 Set cost = widgets * 5

widgets has been declared as an Integer and cannot hold a floating-point value.


Ensembles d'études connexes

Chapter 7 Information Processing Theory

View Set

1) Chapter 19: Inflammation and the Immune Response

View Set

Lab Simulation 3-2: Perform DNS Lookups on Different Servers Network +

View Set

Chapter 7 - Positive Organizational Behavior

View Set

Understananding Health Insurance

View Set

Chapter 16 - Therapy & Treatment ...

View Set