CIS110 4th Week Quiz

Ace your homework & exams now with Quizwiz!

Which operator is used to determine that the operands are not exactly of the same value?

! =

In a selection sort, the first step is to move the smallest value in the array to element __ _, in order to sort the array in ascending order.

0

If the subscripts of an array go from 0 through 9, then the size of the array is ___ _

10

Some languages, such as Visual Basic, use _____ as the not equal to operator.

<>

In languages such as Java, Python, C, and C++ the _____ operator determines whether a variable is equal to another variable.

==

The _____ operator is used to determine whether the operands are exactly the same as each other.

==

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

AND

The _________operator requires both sub expressions to be true for the compound expression to be true.

AND

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

AND

Which operator would make the following expression false? True______ False

AND

What two logical operators perform short-circuit evaluation?

AND and OR

The computer uses the ____ codes to accomplish string comparison.

ASCII

Which of the following is not a check for data accuracy? a. Salary within the allowable range b. Time measurements c. ZIP codes in correct format and valid d. All of the above are checks for data accuracy e. None of the above

All of the above are checks for data accuracy

Which of the following is not an input validation error type? a. Empty input b. Incorrect data type c. Inaccurate data d. All of the above are input validation error types e. None of the above

All of the above are input validation error types

Processing a large number of items in a(n) ____ is usually easier than processing a large number of items stored in separate variables.

Array

When the elements in an array are stored from lowest to highest, the array is sorted in ----order.

Ascending

The priming read is placed ____ the loop.

Before

Which search algorithm uses three variables to mark positions within the array as it searches for the searchValue?

Binary

Which searching algorithm requires the array to be ordered?

Binary

What type of data file cannot be opened and viewed in an editor such as Notepad?

Binary file

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

Black box

The function ____ comprises one or more statements that are executed when the function is called.

Body

The statements that appear between the While and the End While clauses are called the _________.

Body of the loop

A _____ expression evaluates as either true or false.

Boolean

A condition is a _______expression.

Boolean

Most programming languages allow you to write _______ functions, which return either True or False.

Boolean

Using a ________function many times would simplify the long compound Boolean expression that is used by a validation loop.

Boolean

_____ expressions are named in honor of mathematician George Boole.

Boolean

In addition to using loops to validate data, ______ can also be used to validate data.

Boolean Function

As the _______ sorting algorithm makes passes through and compares the elements of the array, certain values move toward the end of the array with each pass.

Bubble

What type of loop uses a Boolean expression to control the number of times that it repeats a statement or set of statements?

Condition-controlled

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

Contains

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

Control

What is the terminology used when a task is temporarily interrupted as a control variable reaches a specific value?

Control break logic

_____ contain information about the user's web browsing session.

Cookies

The following is an example of what type of loop? For k = 7 To maxValue

Count-controlled

Accepting February 29 in only a leap year is a check that is done :by a _____ check.

Date

Which of the following array declarations would be best suited for storing the retail prices?

Declare Real retailPrice[SIZE]

To a variable means to decrease its value.

Decrement

Designing a program to avoid common errors is called _______ programming.

Defensive

_____ programming is the practice of anticipating errors that can happen while a program is running.

Defensive

In an insertion sort, what order are the elements in an array placed using the following Boolean expression? //variable p is used to scan the array While p > 0 AND array[p-1] > array[p]

Descending

The _________symbol indicates that some condition must be tested in a flowchart.

Diamond

Which type of data file access allows access to any piece of data in the file without reading the data that comes before it?

Direct access

The _____ loop is the best choice when you want to perform a task until a condition is true.

Do-Until

The loop that iterates as long as a condition is false and then stops when the condition becomes true is called a _________loop.

Do-Until

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

Do-Until

Which of these are posttest loops?

Do-While and Do-Until

The ----marker indicates where the file's content ends.

EOF or end-of-file

_______ happens when an input operation attempts to read data, but there is no data to read.

Empty input

-------is sometimes the term used for input validation.

Error trap

True/False: A file with the extension .doc usually indicates that the file contains a note written by a doctor.

False

True/False: A posttest loop does not perform any iteration if the Boolean expression is false to begin with.

False

True/False: All types of data files are viewable in a text editor.

False

True/False: An If statement will produce unpredictable results if the programmer does not use proper indentations in pseudocode.

False

True/False: Arrays, like variables, can only hold one value at a time.

False

True/False: Checking for reasonableness of data is programmatically impossible.

False

True/False: Computer programming languages are only able to perform sort algorithms on numeric arrays.

False

True/False: Data files are less and less needed in current gaming software.

False

True/False: If array name contains a list of names, name[l] is the name of the first person.

False

True/False: If the user provides bad data as input to a program, the program will correct the data and produce output.

False

True/False: In a For loop, the programmer should know the exact number of iterations the loop must perform before writing the code.

False

True/False: In a binary search, if the search fails to find the item on the first attempt, then there are 999 elements left to search in an array of 1000 elements.

False

True/False: In a sequential search algorithm, the Boolean variable used as a flag is initialized to TRUE.

False

True/False: In the For statement, you can only use positive integers as step values.

False

True/False: Input validation is not needed if the program is well designed.

False

True/False: It is possible to write a complete program using only a decision structure.

False

True/False: Most programming languages do not provide library functions that can be used for input validation.

False

True/False: One of the advantages of two- or more dimensional arrays is that the data values can be of two or more data types.

False

True/False: Programming languages have not yet started to support localization.

False

True/False: Pseudocode could be logically incorrect if not properly indented.

False

True/False: The If-Then-Else statement should be used to write a single alternative decision structure.

False

True/False: The While loop gets its name from the way it works: While a condition is false, do some task.

False

True/False: The While loop will never execute if its condition is true to start with.

False

True/False: The biggest advantage of the bubble sort algorithm is that values move only by one element at a time toward their final destination in the array.

False

True/False: The bubble sort is limited to arranging data only in acceding order.

False

True/False: The data saved in a file will remain there even after the program stops running but will be wiped out when the computer is turned off.

False

True/False: The direct access file is similar to the way an MP3 player works: the player starts from the beginning.

False

True/False: The empty read is not an obvious input error and is a difficult one to handle.

False

True/False: The first line of the case structure starts with the word CASE followed by the test expression.

False

True/False: The input column in the IPO chart describes the process the function performs on the input data.

False

True/False: The library functions in every programming language have the same function names and accept the same arguments, but their behaviors might differ slightly.

False

True/False: The number of arguments that can be passed to a function are limited in most programming languages.

False

True/False: The programmer has the option to append data anywhere in an output file.

False

True/False: The sequential search algorithm is simple and most efficient to use with a large data array.

False

True/False: The short-circuit evaluation is performed with expressions containing any logical operators.

False

True/False: The swap module is executed with three arguments to correctly swap the elements in an array.

False

True/False: The term input file is used to describe a file that data is written to.

False

True/False: The term output file is used to describe a file that data is read from.

False

True/False: The tolnteger function accepts a real number as its argument and preserves any fractional part in the returned number.

False

True/False: Unlike variables, arrays need to be initialized separately from the declaration.

False

True/False: When values in an array need to be swapped, the array and the size of the array have to be sent to the swap module.

False

What is a short sequence of characters that appears at the end of a filename and is preceded by a period called?

Filename extension

The _____ statement is specifically designed to initialize, test, and increment a counter variable.

For

Which loop is specifically designed to initialize, test, and increment a counter variable?

For

Which loop statement does not contain an increment statement but automatically increments the counter at the end of each iteration?

For

Some programming languages provide this specialized loop that steps through an array, retrieving the value of each element.

For Each

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

Function

The acronym ________is used by programmers to refer to the fact that computers cannot tell difference between good and bad data.

GIGO

What is the famous saying among computer programmers that refers to the fact that computers cannot tell the difference between good and bad data?

Garbage in, garbage out

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

Header

The ____ chart is a tool that programmers use when designing functions.

IPO

How many times will the following loop iterate? Set k = 1 While k< = 5 Display k End While

Infinite

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

Input

What is the term used to describe a file that data is read from?

Input file

Which sorting algorithm sorts the first two elements of an array before inserting the remaining elements into that sorted part of the array?

Insertion

In the following declaration, what is the data type of the elements of the array? Declare Integer numbers [SIZE]

Integer

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

Integer

In the swap module, the third variable is declared as a ____ variable.

Local

-------is the process where a program can be configured for a specific country.

Localization

A case structure is a -----alternative decision structure.

Multiple

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

NOT

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

NOT

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

NOT

How many times will the following loop iterate? Set k = 1 While k> 5 Display k End While

No iterations

The _______ operator is best to determine whether a number is outside a range.

OR

Which operator would make the following expression true? False ___ True

OR

What type of error occurs when a loop iterates one time too few or one time too many?

Off-by-one error

How many times will the following loop iterate? Set k = 1 Do Display k Set k = k + 1 Until k > 1

One

What is the subscript for the data value 92 in the example given below? Declare Integer score [5] = 83, 92, 78, 94, 71

One

Opening a(n) file creates a file on disk and allows the program to write data to it.

Output

What type of file does the AppendMode work with?

Output file

A three-dimensional array can be thought of as ___ of two-dimensional arrays.

Pages

__________ arrays are two or more arrays that hold related data, and the elements are accessed using a common subscript.

Parallel

The purpose of the ____ is to get the first input value for the validation of a loop.

Priming read

When a piece of data is written to a file, it is copied from a variable in _____ to the file.

RAM

In an input file, what maintains the location of the next item that will be read from the file?

Read position

What is the first step to use in detecting data type mismatch errors?

Read the input as a string

Examine the following piece of code and determine the data type of the function's return value. Function Real sum (Integer num1, Integer num2) Declare Integer result Set result = num 1 + num2 Return result End Function

Real

If, when asked for a date of birth, the user enters a future date, this error should be caught by a _____ check.

Reasonableness

Which flowcharting symbol is used for opening and closing files?

Rectangle

What type of operator can be used to determine whether a specific relationship exists between two values?

Relational

What type of operators are the following? > < >= <= -- !=

Relational

Which structure causes a statement or set of statements to execute repeatedly?

Repetition

One of the statements in the function body must be a _______ statement.

Return

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

Return

Two- dimensional arrays can be thought of as containing ____ _

Rows and columns

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

Running total

The expression score[5] is pronounced ---------

Score sub 5

Which sorting algorithm moves elements to their final sorted position in the array?

Selection

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

Sentinel

Consider the following statement: A store is giving a discount of 30% for all purchases of over $100. Which of the following is not the appropriate structure to use to program the statement?

Sequence

Which is the simplest search technique to use to find an item in an array?

Sequential

____________ access files are easy to work with, and you can use them to gain an understanding of basic file operations.

Sequential

Which type of data file access starts from the beginning of the file and proceeds to the end of the file?

Sequential access

What is the term used for the number inside the bracket that specifies the number of values that an array can hold?

Size declarator

The term ____ is used in the For loop if the counter needs to be incremented by a value other than one.

Step

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

Step amount

What type of function can be used to see if the password entered has the minimum number of characters?

String

What does the variable middle represent in a binary search algorithm?

Subscript of the midpoint

Access the individual elements in an array by using their _____ _

Subscripts

Which function returns a string within a string?

Substring

In many languages the case structure is called a _____ statement.

Switch

What type of data file can be opened and viewed in an editor such as Notepad?

Text file

Which of the following statements is true about this Boolean expression? score < 0 AND score > 100

This expression would never be true.

Which of the following statement is true about the statement below? Declare Integer score [5] = 83, 92, 78, 94, 71

This is an array declaration and initialization.

How many steps must be taken when a file is used by a program?

Three

How many times will the following loop iterate? For j = 1 To 5 Step 2 Display j End For

Three

True/False: A While loop repeats infinitely when there is no statement inside the loop body that makes the test condition false.

True

True/False: A condition-controlled loop can be used to iterate the body of the loop a specific number of times.

True

True/False: A nested decision structure can achieve the same logic as a case structure.

True

True/False: A nested decision structure can be used to test more than one condition.

True

True/False: All sorting algorithms contain a group of statements that swap values in array elements.

True

True/False: Although the sequence structure is heavily used in programming, it cannot handle every type of task.

True

True/False: An input validation loop is sometimes called an error handler.

True

True/False: Any loop that can be written as a Do-While loop can also be written as a While loop

True

True/False: Array bounds checking happens at runtime, which is while the program is running.

True

True/False: Checking for accuracy of data, even when the user provides the right type of data, is part of input validation.

True

True/False: Decision structures are also known as selection structures.

True

True/False: In a selection sort algorithm, the variable minValue holds the smallest value found in the scanned area of the array.

True

True/False: In a sequential search, each element is compared to the searchValue and the search stops when the value is found or the end of the array is encountered.

True

True/False: In a text file, all data is stored as a series of characters.

True

True/False: In an expression with an OR operator, it does not matter which sub expression is true for the compound expression to be true.

True

True/False: Library functions are built into the programming language, and can be called any time they are needed.

True

True/False: Modules can be called from statements in the body of any loop.

True

True/False: Most programming languages let you assign an integer value to a real variable without causing an error.

True

True/False: Multiple-dimensional arrays can be used to model data that occurs in multiple sets.

True

True/False: Often a Boolean function can be used to validate data.

True

True/False: Programs should be designed such that all input is inspected before it is processed and bad data is discarded.

True

True/False: Random numbers are useful in simulation programs where the computer must randomly decide how an object will behave.

True

True/False: Subscripts are used to identify specific elements in an array.

True

True/False: Swapping the contents of two variables requires a third variable that can serve as a temporary storage location.

True

True/False: The If-Then-Else statement can be used to simplify a complex nested decision structure.

True

True/False: The While and For loops are considered pretest loops because they test the condition before processing the statement( s) in the loop body.

True

True/False: The While loop is known as a pretest loop, which means it tests its condition before performing an iteration.

True

True/False: The conditions that control a loop repetition are Boolean expressions.

True

True/False: The data in an array can be sorted in either ascending or descending order.

True

True/False: The first step in calculating the average of the values in an array is to get the total of the values.

True

True/False: The function body follows the function header in a function definition.

True

True/False: The parameter list that accepts arguments is optional in a function definition.

True

True/False: The practice of anticipating errors that can happen while a program is running and designing the program to avoid those errors is called defensive programming.

True

True/False: The priming read is needed when a pretest loop is executed.

True

True/False: The sequential access file is similar to the way a cassette player works.

True

True/False: The use of a buffer increases the system's performance because writing data to memory is faster than writing to a disk.

True

True/False: The value that is returned from a function can be used just like any other value.

True

True/False: To calculate the total of the values in an array, a loop is used with an accumulator variable.

True

True/False: Variables work well in many situations, but they have limitations.

True

True/False: When a function finishes, it returns a value back to the part of the program that called it.

True

True/False: When an input file is opened, the read position is initially set to the first item in the file.

True

True/False: When processing the data in a two-dimensional array, each element has two subscripts. ANS: T

True

True/False: When using string input validation it is wise to use the library function to convert the input to upper case or lowercase so case-sensitive string comparisons can be made.

True

How many subscripts do you need to access one element in a two-dimensional array?

Two

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

Type mismatch

Input ________ is commonly done with a loop that iterates as long as an input variable contains bad data.

Validation

When the _______ loop executes, the condition is tested; if it is true, the loop body is executed, and then the loop starts over; if the condition is false, the loop terminates.

While

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

While and Do-While

When the user enters a U.S. Address, the value entered as the ----should be checked to verify that it is both valid and in the correct format.

ZIP code

The subscript of an element in a two-dimensional array that is in Row two and Column one is ________

[1,0]

Which of the following search algorithms should be used on large arrays if speed is important? a. Binary b. Sequential c. Bubble d. Selection e. Insertion

a. Binary

Which of the following sorting algorithms is the least efficient? a. Bubble sort b. Insertion sort c. Selection sort d. All of the above e. None of the above

a. Bubble sort

Loops are used to total the values in a numeric array, by which process the loop steps through the array adding the value of each array element to the ____ _

accumulator

The variable that is used to keep the running total in a loop is called a(n) ______ _ in programming.

accumulator

A partially filled array is normally used with ___ _

an accompanying integer variable that holds the number of items that are actually stored in the array

The ________function accepts two strings as arguments and returns a third string that is created by appending the second string to the end of the first string.

append

An ___ allows you to store a group of items of the same data type together in memory.

array

When working with arrays most programming languages perform _____ , which means they do not allow programs to use invalid subscripts.

array bounds checking

If the values in an array are sorted in _____ order, they are sorted from lowest to highest.

ascending

To order an array of strings in alphabetic order, the sorting algorithm should be structured for -----order.

ascending

The ____ search algorithm locates an item in an array by repeatedly dividing the array in half.

binary

Because you do not see the internal workings of library functions, many programmers think of them as -------

black boxes

Programming languages perform array ____ checking, which means they do not allow a program to use an invalid array subscript

bounds

In the bubble sort algorithm, the movement of the sorted values is commonly described as seeming to ________ toward the end of the array.

bubble

The ____ is a small holding section in memory.

buffer

The variable r would contain the value after the execution of the following statement. Declare Integer i = 12 Declare Real r Set r = toReal (i) a. 12 b. 1.2 c. 12.0 d. 0.12 e. None of the above

c. 12.0

When a program ____ a file, it disconnects the file from the program.

closes

The process of appending one string to the end of another string is called ______ _

concatenation

When a web page is visited, the browser stores a small file on the user's computer, known as a _______.

cookie

A __________controlled loop repeats a statement or set of statements a specific number of times.

count

A count-controlled loop uses a variable known as ____ to store the number of iterations that it has performed.

counter variable or counter

Which of the following arguments must be passed when passing an array as an argument? a. The array itself b. An integer that specifies the number of elements in the array c. The data type of the array d. A and B e. A and C

d. A and B

Which of the following is a logical operator? a. AND b. NOT c. OR d. All of the above e. None of the above

d. All of the above

Which of the following is a sorting algorithm? a. Bubble sort b. Selection sort c. Insertion sort d. All of the above e. None of the above

d. All of the above

Which of the following statements is true after the execution of the following statement? Set needANumber = random(5, 10) a. A random number is generated between 5 and 10. b. The random number is assigned to the variable needANumber. c. The numbers 5 and 10 are the arguments of the random number function. d. All of the above e. None of the above

d. All of the above

You cannot store a mixture of _____ in an array.

data

All the values in an array must be of the same _____ _

data type

When a program performs actions only under certain conditions, it is using a ___ _ structure.

decision

In a For loop a negative step value is used to ____ the counter variable.

decrement

The statement( s) that immediately follow the ________ statement is executed if the test expression in the case structure does not match any case values.

default

If the values in an array are sorted in _____ order, then they are stored from highest to lowest.

descending

The ____ symbol is used to represent a selection structure in flowcharting.

diamond

In a decision structure, one path is taken if a condition is true and the other path is taken if the condition is false.

dual alternative

Random numbers are commonly used in which type of program? a. Games b. Simulations c. Statistical analysis d. Data encryption e. All of the above

e. All of the above

Which of the following software packages store data in files? a. Word processors b. Image editors c. Games d. Web browsers e. All of the above

e. All of the above

In a binary search, what is the maximum number of comparisons that need to be performed if the array contained 1000 elements? a. 1000 b. 500 c. 250 d. 100 e. None of the above

e. None of the above

In the bubble sort algorithm, the two arguments sent into the swap module are ____ a. array[index] and array[index-1] · b. array[index+1] and array[index-1] c. array[index-1] and array[index+1] d. array[index-1] and array[index] e. None of the above

e. None of the above

Which of the following is optional when writing a function definition? a. Function header b. Function body c. Data type d. Return statement e. None of the above

e. None of the above

The storage locations in an array are known as-------

elements

The -------occurs when the user presses the ENTER key without typing a value for an input operation.

empty input

In most languages, if a file with the specified external name already exists when the file is opened, the contents of the existing file will be ____

erased

When a function is called, it is ____ _

executed

The-------usually indicates the type of data stored in the file.

extension or filename extension

In an If-Then-Else statement, the Else clause marks the beginning of the statements to be executed when the Boolean expression is-------

false

When a program needs to save data for later use, it writes the data to a ___ _

file

Boolean variables are commonly used as ____ , which indicate: whether a specific condition exits.

flags

A(n) ________ loop continues to repeat until the program is interrupted.

infinite

An error trap can be performed by a(n) _________ validation loop.

input

The integrity of a program's output is only as good as the integrity of the program's ___ _

input

You should design your programs in such a way that bad _____ is never accepted.

input

An input validation that accepts strings in mixed case would have incorporated a case---- string comparison operation.

insensitive

Which of the following library functions could be used to validate that the correct data type was input for an amount of money?

isReal

The ____ function can be used to determine whether a string can be converted to an integer.

islnteger

To validate if the input data is a valid integer, use the ____ library function.

islnteger

The total number of _____ of a nested loop is the product of the number of iterations of all the loops.

iterations or repetitions

The _________function accepts a string as its argument and returns the number of characters in the string.

length

The string _________function plays a role in the string's validity when a minimum number of characters are required to be entered.

length

Which of the following library functions could be used to validate the length of a string?

length

Arrays are designed to store and process a ____ of data.

list

In a count-controlled loop the test action compares the counter variable to the ____ value to determine if the loop iterates or terminates.

maximum

In a selection sort, which variable holds the subscript of the element with the smallest value found in the scanned area of the array?

minlndex

The word OutputFile indicates the ____ in which the file is used.

mode

For an array of n items, the maximum number of comparisons in a sequential search is __ _

n

For an array of n items, the average number of comparisons in a sequential search is __ _

n / 2

A structure that has a loop that is inside another loop is called a ____ loop

nested

In most programming languages, an array size declarator must be a ____ integer.

nonnegative

In the bubble sort algorithm, the second loop iterates ___ for each of the unsorted array elements.

once

There can be only ___ return value from a function to the called module.

one

The process of ____ a file creates a connection between the file and the program.

opening

An inner loop goes through all of its iterations for every single iteration of the _______ loop

outer

The ----column describes the data that is returned from the function in an IPO chart.

output

The ----file is used to describe a file that data is written to.

output

In flowcharting, the ____ symbol is used to read data from a file.

parallelogram

In a flowchart of a function, the starting terminal symbol states the name of the function, along with any ________that the function has.

parameters

A ____ loop could be used to validate input instead of using the priming read.

posttest

The Do-While loop is a _____ loop

posttest

Programs that contain a priming read have a ____ loop.

pretest

The input operation that is performed just before a validation loop is known as the ___ _

priming read

In the ____ step the data is either written to the file or read from the file.

processing

The direct access file is also known as a -----access file.

random

When a program performs the task of retrieving data from a file, it is known as ____ data from/to the file.

reading

Data in a file is organized in ___ , which are a complete set of data about an item.

records

When using a module to swap the values in two variables, the arguments must be passed into ____ parameters in the module.

reference

In a sorting algorithm, the sort order can be changed by changing the ______ _ operator.

relational

A ------structure is commonly known as a loop.

repetition

Examine the following piece of code and state the return value of the function. Function Integer product (Integer num1, Integer num2) Declare Real result Set result = num 1 + num2 Return result End Function

result

A _____ statement specifies the value that is returned from the function when the function ends.

return

What is the term used for the value that is searched for in a search algorithm?

searchValue

When placing the elements in an array ·in descending order, the ____ sort begins by finding and placing the largest value in element 0.

selection

When a loop rejects any input except the strings "yes" and "no" then it is performing a case_____ comparison.

sensitive

When processing a long list of values with a loop, the program knows it has reached the end of the list when the _____ value is read.

sentinel

The ______ search algorithm stops when the item is found or the end of the array is reached.

sequential

The advantage of the ____ search is its simplicity.

sequential

When the _____ fails to locate an item, it must make a comparison with every element in the array.

sequential search

The expression with an AND operator _______ when the expression on its left is false and so it does not evaluate the expression on its right.

short circuits

The--------decision structure provides only one alternative path of execution.

single alternative

A(n) _______algorithm is a technique for stepping through an array and rearranging its contents in some order.

sorting

The ___ function accepts an argument and returns the square root of the argument.

sqrt

The ____ function does the same thing as using the mathematical A operator.

sqrt

A function is a group of ____ that perform a specific task.

statements

Every element in an array is assigned a unique number known as a ______

subscript

In the bubble sort algorithm, the maxElement variable will hold the ___ of the last element that is to be compared to its immediate neighbor.

subscript

Using a loop's counter variable as a _____ makes it possible to perform the same action on each element in an array.

subscript

By using the same ______ , a relationship can be established with the data stored between two or more arrays

subscripts

The _____ statement is commonly used in programming languages for case structure.

switch

To successfully swap the contents of two variables, we need a third variable that can serve as a _____ storage location.

temporary

The value of the _________is compared with the values that follow each of the Case statements when a Select Case statement executes.

test expression

A file contains data that has been encoded as text, using one of the computer's encoding schemes.

text

In a count-controlled loop, the counter performs ___ action(s).

three

There are always ____ steps that must be taken when a file is used by a program.

three

When a payroll program verifies that no value greater than 168 is entered for the number of hours worked in a week, it is performing a _________check.

time measurement

Which of the following library functions could be used to simplify the process of string validation?

toUpper

Declaring a two-dimensional array requires ___ size declarators

two

In a selection sort, when changing from ascending to descending order, only ___________ modifications need to be made to the algorithm.

two

In general, how many types of files are there?

two

Passing an array as an argument requires that you pass _____ argument(s).

two

The following loop will perform iterations. For start = 6 To 2 Step -3

two

When writing a program to perform a file operation, there are ____ names that you have to work with in the program's code.

two

A--------array is like several identical arrays put together.

two-dimensional

After the string is read it is determined if it can be converted to the desired data type in a ------error.

type mismatch

When ________ data is entered by the user, the program should at least ask the user to confirm that he or she intended to enter it.

unreasonable

The first step in finding the highest value in an array is to create a _____ to hold the highest value

variable

Programmers usually refer to the process of saving data to a file as ______ a file.

writing data to

Which statement is true after the execution of the following statements? Set t = x Set x = y Set y = t

x and y swapped their values

Which statement is true after the execution of the following statements? Set x = y Set y = x

x contains the value in y and y stayed the same

Which of the following statements is true after the execution of the following statement? y = abs(x)

y contains the absolute value of the value in x

In a selection sort, the minValue is set to element __ in the first iteration of the outer loop.

zero

In programming, the characters in a string are each identified by its position number, and the first character is in position number ___ _

zero

The first subscript in a one-dimensional array is ______ _

zero


Related study sets

ACC201 C1.2: Explain the Building Blocks of Accounting: Ethics, Principles, and Assumptions

View Set

Chapter 1: Introduction to Psychology

View Set

Principles of Economics CH. 9: Application: International Trade

View Set

Week 3 Sherpath Lessons- Nursing Fundamentals

View Set