CSC 112 2

Ace your homework & exams now with Quizwiz!

A(n) __________ is a message that is displayed on a monitor, asking the user for a response. a. command prompt b. input screen c. prompt d. input data

c. prompt

A variable name is also called a(n) __________. a. identifier b. marker c. constant d. placeholder

a. identifier

Program comments constitute __________ program documentation. a. internal b. system c. external d. technical

a. internal

Which of the following is an example of a string constant? __________ a. 1 b. 12432 c. "12432" d. oops

c. "12432"

What is the name for the practice of naming variables with multiple words that run together and each initial letter of a word is capitalized, for example myFirstName? __________ a. Kebob casing b. Snake casing c. Camel casing d. Hungarian notation

c. Camel casing

__________ is the feature of programs that assures you a module has been tested and proven to function correctly. a. Modularization b. Abstraction c. Reliability d. Reusability

c. Reliability

What is the flowchart symbol for a module? __________ a. a circle b. a parallelogram c. a rectangle with a bar across the top d. a square

c. a rectangle with a bar across

Which of the following correctly stores the value "Blue" in the variable color? __________. a. color = Blue b. Blue = "color" c. color = "Blue" d. "Blue" = color

c. color = "Blue"

Programmers say the statements that are contained in a module have been __________. a. embedded b. decomposed c. encapsulated d. modularized

c. encapsulated

What is the best choice for a variable name representing an interest rate? __________ a. i b. ir c. interest d. interest rate

c. interest

A hierarchy chart illustrates relationships between __________. a. variables b. files c. modules d. programs

c. modules

Declaring a starting value is known as ___________________________________ the variable.

initializing

When a program has several modules calling other modules, programmers often use a program __________ to show the overall picture of how modules are related to one another. a. hierarchy chart b. tree chart c. flowchart d. data diagram

a. hierarchy chart

The assignment operator is a(n) __________. a. = b. * c. : d. +

a. =

__________ is the process of paying attention to important properties while ignoring nonessential details. a. Abstraction b. Modularization c. Reusability d. Direction

a. Abstraction

__________ documentation includes all the supporting paperwork that programmers develop before they write a program. a. External b. Internal c. End user d. Input

a. External

Which of the following is NOT a legal variable name in any programming language? __________ a. MY GRADE b. gradeInCSC112 c. semester-grade d. fall2010_grade

a. MY GRADE

A module __________. a. can call another module b. can never contain only a single statement c. must fit on a page d. must have at least two exit points

a. can call another module

Common end-of-job tasks in a program include all of the following except __________. a. opening files b. displaying totals c. displaying final messages d. closing files

a. opening files

The __________ dictate the order in which operations in the same statement are carried out. a. rules of precedence b. statement rules c. operation rules d. rules of arithmetic

a. rules of precedence

Global variables can be used in any module of a program. a. true b. false

a. true

In many programming languages, if you declare a variable and do not initialize it, the variable contains an unknown value until it is assigned a value. a. true b. false

a. true

Most programming languages require that module names begin with an alphabetic character. a. true b. false

a. true

One of the benefits of modularization is that it allows multiple programmers to work on the same program. a. true b. false

a. true

The ability of variables to change in value is what makes computers and programming worthwhile. a. true b. false

a. true

When declaring a variable in languages such as C++, Java, and C#, the variable name and data type must be identified. a. true b. false

a. true

When programs are made of modules, the modules can be reused in different programs. a. true b. false

a. true

When the first letter of a variable is uppercase, as in HourlyWage, the format is known as __________. a. Hungarian notation b. Pascal casing c. Camel casing d. Snake casing

b. Pascal casing

A(n) __________ is most often represented by a three-sided box that is connected to the step it references by a dashed line. a. abstraction symbol b. annotation symbol c. abbreviation symbol d. enumeration symbol

b. annotation symbol

A module name can be one or more words separated by spaces. a. true b. false

b. false

A string constant is enclosed in parentheses. a. true b. false

b. false

All programming languages support four broad data types. a. true b. false

b. false

At any moment in time, a variable can hold more than one value. a. true b. false

b. false

Most modern programming languages require that program statements be placed in specific columns. a. true b. false

b. false

Opening files is most often performed in a program's main loop. a. true b. false

b. false

Programmers will generally write programs as one long series of steps. a. true b. false

b. false

The process of naming program variables and assigning a type to them is called initializing variables. a, true b. false

b. false

Whenever a main program calls a module, the logic transfers to the main program. a. true b. false

b. false

The __________ can be a useful tool when a program must be modified months or years after the original writing. a. flowchart b. hierarchy chart c. pseudocode d. variable declaration

b. hierarchy chart

In a flowchart, you draw each module separately with its own sentinel symbols. The symbol that is equivalent to the start symbol in a program contains the __________. a. id of the module b. name of the module c. description of the module d. name of the program

b. name of the module

The __________ statement is used to indicate the end of a module. a. stop b. return c. done d. quit

b. return

Which of the following is NOT a good reason to use modularization? __________ a. abstraction b. shorter source code c. reusability d. allows multiple programmers to work on the same program

b. shorter source code

A(n) ___________ variable is not used for input or output, but instead is just a working variable that you use during a program's execution. a. programming b. throw away c. temporary d. calculating

c. temporary

When you write programs, you work with data in three different forms: __________. a. values, variables (or named values), and unnamed values b. variables, named constants, and named memory c. variables, literals (or unnamed constants), and named constants d. variations, RAM (or unnamed constants), and named values

c. variables, literals (or unnamed constants), and named constants

The more the statements contribute to the same job, the greater the functional ________________________ of the module.

cohesion

Program __________________________ are written explanations that are not part of the program logic but that serve as documentation for readers of the program.

comments

__________ variables and constants are known to the entire program. a. Local b. Default c. Normal d. Global

d. Global

In a hierarchy chart, you __________ a program module that is reusable. a. bold the text in b. underline the text in c. put a rectangle above d. blacken a corner of

d. blacken a corner of

Which name is best suited to a module that calculates overtime pay? __________ a. calcO() b. cO() c. calculate overtime() d. calculateOvertime()

d. calculateOvertime()

In some programming languages, programmers must write a variable __________ telling the compiler what data type is expected for the variable. a. name b. termination c. decision d. declaration

d. declaration

A variable's unknown value is commonly called __________. a. initial b. default c. random d. garbage

d. garbage

Which of the following is NOT another name for a module? __________ a. subroutine b. function c. procedure d. loop

d. loop

If a module is useful and well-written, you may want to use it more than once within a program or in other programs. This is known as __________. a. reliability b. scalability c. abstraction d. reusability

d. reusability

Programmers refer to programs that contain meaningful names as __________. a. undocumented b. procedurally documented c. formally documented d. self-documenting

d. self-documenting

The act of repeating input back to a user either in a subsequent prompt or in output is called _____________________________.

echoing input

________________________________ tasks include any steps you must perform at the beginning of a program to get ready for the rest of the program.

housekeeping

Each programming language has a few reserved ____________________________ that are not allowed as variable names because they are part of the language's syntax.

keywords

Variables that are declared inside the module that uses them are known as ____________________________ variables.

local

Most programs contain a main module that contains the _____________________ logic; this module than accesses other modules or subroutines.

mainline

The process of breaking down a large program into modules is called _________________________________.

modularization

A variable that can hold values such as 1, 2.3, -2, and 8 is called a(n) ________________________ variable.

numeric

Many programming languages follow the name of a module with ______________.

parentheses

The flowchart symbol used to call a module is a(n) __________________________ with a bar across the top.

rectangle

Software that is reusable is more ___________________________________.

reliable


Related study sets

Homework 3.4 Price Ceilings and Price Floors

View Set

Anthropogenic Causes of Climate Change

View Set