Programming Chapter 2
A(n) ________ operator performs a division, but instead of returning the quotient it returns the remainder. a. modulus b. multiplication c. exponent d. operand
Modulus
A(n)_________ is a variable whose context has a value that is read only and cannot be changed during the program's execution. a. static variable b. uninitialized variable c. named constant d. locked variable
Named constant
In the expression 12 + 7, the values on the right and left of the + symbol are called _____. a. operands b. operators c. arguments d. math expressions
Operands
A(n) ______ is a message that tells (or asks) the user to enter a specific value. a. inquiry b. input statement c. directive d. prompt
Prompt
An informal language that has no syntax rules, and is not meant to be compiled. a. faux code b. pseudocode c. java d. a flowchart
Pseudocode
A(n) ________ is a set of statements that execute in the order they appear. a. serial program b. sorted code c. sequence structure d. ordered structure
Sequence Structure
A __________ is a single function that the program must perform in order to satisfy the customer. a. task b. software requirement c. prerequisite d. predicate
Software requirement
A _________ is a sequence of characters that is used as data. a. Sequence structure b. Character collection c. String d. Text blcok
String
In a math expression, multiplication and division takes place before addition and subtraction.
True
In languages that require variable declarations, a variable's declaration must appear before any other statements that use the variable
True
In most languages, the first character of a variable name cannot be a number
True
The value of a named constant cannot be changed during the programs execution
True
Uninitialized variables are a common cause of errors
True
A(n) ______ variable is one that has been declared, but has not been initialized. a. undefined b. uninitialized c. empty d. default
Unintialized
A _______ is any hypothetical person that is using a program and providing input for it. a. designer b. user c. guinea pig d. test subject
User
A ______ is a storage location in memory that is represented by a name. a. variable b. register c. RAM slot d. byte
Variable
A(n) _______ specifies a variable's name and data type. a. assignment b. variable specification c. variable certification d. variable declaration
Variable declaration
A set of well-defined, logical steps that must be taken to perform a task. a. logarithm b. plan of action c. logic schedule d. algorithm
Algorithm
A(n) ________ sets the variable to a specified value. a. variable declaration b. assignment statement c. math expression d. string literal
Assignment statement
Short notes placed in different parts of a program, explaining how those parts of the program work, are called ________. a. comments b. reference manuals c. tutorials d. external documentation
Comments
A(n) _____ operator raises a number to a power. a. modulus b. operators c. exponent d. operand
Exponent
Hand Tracing is the process of translating a psuedocode program into machine language by hand
False
Internal documentation refers to books and manuals that document a program, and are intended for use within a company's programming department
False
Programmers must be careful not to make syntax errors when writing psuedocode
False
The name gross_pay is written in the camelCase convention
False
Variable names can have spaces
False
A _________ is a diagram that graphically depicts the steps that take place in a program. a. flowchart b. step chart c. code graph d. program graph
Flowchart
A debugging process in which you imagine that you are the computer executing a program is called ______. a. imaginative computing b. role playing c. mental stimulation d. hand tracing
Hand tracing
Assigning a value to a variable in a declaration statement is called ________. a. allocation b. initialization c. certification d. programming style
Initialization
A __________ error does not prevent the program from running, but causes it to produce incorrect results. a. syntax b. hardware c. logic d. fatal
Logic