Which type of variable is visible to every module and the entire program?
local
global
reference
pass by value
pass by reference
The scope of the parameter variables is the entire program and it is visible to any statement in the program
true
false
A module can have two variables of the same name because they are within the same scope
To execute a module, we must ____ it
compile
parse
define
debug
call
When an argument is passed by value, the communication channel works only in one direction.
_________ variables are useful for establishing two-way communication between modules.
constant
I/O
value
none of the above
The top-down design process is sometimes called stepwise refinement.
The module definition comprises the module header and the module _________.
arguments
body
parameters
statements
Which of the following is not a benefit of using modules?
simpler code
code reuse
better testing
faster development
The following is an example of a module _______. Call showNetPay( )
header
display
definition
execution
When an argument is passed by ______., it is not affected by a change of the content of the parameter variable.
variable
The arguments in a module call and the parameters listed in the module header must be of compatible data types.
Passing an argument by ____ means that only a copy of the argument's value is passed into the parameter variable.
The scope of the variable is the segment of the program in which the variable can be accessed.
In most languages a module definition has three parts: a header, body, and a footer.
Which type of variable is not recommended to be used in programs because they make programs hard to understand and debug?
Modules can be written for commonly needed tasks and those modules can be incorporated into each program that needs them.
A pass by reference argument established a two-way communication with the module, but the value of the argument cannot be modified via the reference variable.
A bit that is turned off is represented by the value -1.
RAM is a volatile memory used for temporary storage while a program is running.
The process known as the _____ cycle is used by the CPU to execute instructions in a program.
decode-execute-fetch
execute-decode-fetch
decode-fetch-execute
fetch-decode-execute
fetch-execute-decode
What functions(s) does an interpreter perform with the instructions in a high level programming language?
translates
compiles
compiles and translates
translates and execute
execute
The following is an example of an instruction written in which computer language? 10110000
JAVA
C#
C++
Machine Language
Assembly Language
Programs that use an interpreter generally execute faster than compiled programs because they are already entirely translated into machine language when executed.
The main reason for using secondary storage is to hold data for long periods of time, even when the power to the computer is turned off.
Most programs written in high-level language need to be translated into machine language.
Programs that make a computer useful for everyday tasks are known as _______.
utility programs
system software
application software
operation system
The term used for a set of rules that must be strictly followed when writing a program is ________.
semantics
punctuations
syntax
The CPU understands instructions in machine language, which are written in binary.
Which computer language uses short words known as mnemonics for writing programs?
Java
Visual Basic
Pascal
Assembly
Assembly language is referred to as a low-level language because it is close to the C++ language.
It has been proven by a group of mathematicians that all programs can be written using only three structures.
A variable is a storage location in memory that is represented by a name and can hold different values during the execution of the program.
What term is used for a string that appears in the actual code of the program?
virtual string
hard copy
strongly typed
string literal
Most programming languages do not automatically print spaces between multiple items that are displayed on the screen.
A ______ structure is a set of statements that execute in the order that they appear.
sequence
control
repetition
decision
A sequence of characters that is used as data is called a string in programming.
Programmers start writing code as the first step when they begin a new project.
The expressions (a+b) / c and a + b /c will always yield identical results.
Which of the following is not a variable data type?
integer
number
real
string
Although the sequence structure is heavily used in programming, it cannot handle every type of task.
A case structure is a ________ alternative decision structure.
dual
multiple
single or dual
single
all of the above
What type of operators are the following? > = = = ! =
boolean
mathematical
relational
logical
An If statement will produce unpredictable results if the programmer does not use proper indentations in psuedocode
Decision structures are also known as selection structures
It is possible to write a complete program using only a decision structure
Which operator is best to determine whether x contains a value in the range of 10 through 57?
AND
==
NOT
OR
The first line of the case structure starts with the word CASE followed by the test expression.
What two logical operators perform short circuit evaluation?
AND and OR
NOT and OR
AND and NOT
Which operator is used to determine that the operands are not exactly of the same value?
=!
=
!
In an expression with an OR operator, it does not matter which sub expression is true for the compound expression to be true.
What type of operator can be used to determine whether a specific relationship exists between two values?
Which of the following is a logical operator?
In many languages the case structure is called a _____ statement.
branch
selective
jump
switch
A nested decision structure can be used to test more than one condition.
If the expression is false, the ________ operator will return true.
All of the above
The if-then-else statement should be used to write a single alternative decision structure
A file that data is written to is known as a(n)
output file
sequential access file
binary file
A file that data is read from is known as a(n)
input file
Before a file can be used by a program it must be
formatted
encrypted
closed
opened
This type of file contains data that has not been converted to text.
text file
English file
human readable file
This is a character or set of characters that marks the end of a piece of data
median value
delimeter
boundary marker
EOF marker
This is a character or set of characters that mark the end of a file
This marks the location of the next item that will be read from a file
input position
pointer
read position
When a file is opened in this mode, data will be written at the end of the file's existing contents
append mode
backup mode
read-only mode
When working with a sequential access file, you can jump directly to any piece of data in the file without reading the data that comes before it.
In most languages, when you open an output file and that file already exists on the disk, the contents of the existing file will be erased