programming

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

This operator takes an operand and reverses it

!

This operator represents the logical AND

&&

These operators add and subtract 1 from their operands

++ and --

What is the last legal subscript that can be used with the following array

4

Look at the following statement - which operator is used first (increment or decrement question)

<

This operator is used in C++ to represent equality

==

The statements in the body of a while loop may never be executed whereas the statements of the body of a do-while loop will be executed ______

At least once

Without this statement appearing in a switch construct, the program falls through all of the statements with the matching case expression

Break

The individual values contained in an array are known as

Elements

A local variable and a global variable may not have the same name within the same program

False

An array initialization list must be placed on a single line

False

Assume array 1 and array 2 are names of arrays. To assign the contents of array 2 to array 1, you would use the following statement

False

If you attempt to store data past an array's boundaries, it is guaranteed the compiler will issue an error

False

The condition that is tested by a while loop must be enclosed in parenthesis and terminated with a semicolon

False

The default section is required in a switch statement

False

The following code correctly determines whether x contains the value in the range of 0-100

False

The increment and decrement operators can be used in mathematical expressions, however, they may not be used in relational expressions

False

The statement double money[25.00] is a valid c++ array definition

False

You may nest while and do while loops, but you may not nest for loops

False

This is a variable usually a boolean or integer that signals when a condition exists

Flag

An array can easily be stepped through by using a _______

For loop

A ____ can be used to specify the starting values of an array

Initialization list

The name of an array stores the __________ of the first array element

Memory address

This statement lets the value of the variable or expression determine where the program will branch to

Switch

If you place a semicolon after the following statement, pick the correct answer

The compiler will interpret the semicolon as a null statement.

An array can store a group of values, but the values must be

The same data type

A while loops body can contain multiple statements as long as they are enclosed in braces

True

An expression that has any other value than 0 is considered true by an if statement

True

An individual array element can be processed like any other type of C++ variable

True

As a rule of style, when writing an if statement, you should indent the conditionally executed statements

True

Both of the following if statements Perform the same operation

True

If the subexpression on the left side of an OR operator is true, the expression on the right side will not be checked

True

If the subexpression on the left side of an and operator is false, the expression on the right side will not be checked

True

It is not considered good programming practice to declare all of your variables globally

True

The amount of memory used by an array depends on the array's data type and the number of elements in the array.

True

The update expression for for loop can contain one or more statements

True

The while loop contains an expression that is tested for a true or false value and a statement or block that is repeated as long as the expression is _______

True

You may define a _______ in the initialization expression of a for loop

Variable

If you leave out the size declarator in an array definition ___________

You must furnish an initialization list

How many elements does the following array have

[1000]

To assign the contents of one array to another, you must use

any of these

Unlike regular variables, these can hold multiple values

arrays

Subscript numbering in C++ - pick the appropriate answer

begins w 0

Relational operators allow you to _____ numbers

compare

An array size declarator must be a _______ with a value greater than ______

constant integer expression, zero

This statement may be used to stop a loop current iteration and begin the next one

continue

An array with no elements is:

illegal in C++

Something within a while loop must eventually cause the condition to become false or a ______ results

infinite loop

In a for statement, this expression is executed only once

initialization

Arrays may be _____ at the time they are ______

initialized, declared

While of the following is a valid C++ array definition

int scores [10];

This is a control structure that causes a statement or group of statements to repeat

loop

A loop that is inside another loop is called

nested loop

When an if statement is placed within a conditionally executed code

nesting

Unlike regular variables, these can hold multiple values

none of the above

This operator increments the value of an operator and then uses the value in the context

prefix increment

The while loop is this type of loop

pretest

Given the following declaration, which cell is 77 stored in

scores[2]

An array of string objects that will hold 5 names will be declared using the following statement

string names[5];

By using the same ______ you can build relationships between data stored in two or more arrays

subscript

A for statement constraints 3 expression: initialization, test, and _______

update


Kaugnay na mga set ng pag-aaral

Finals Review pt.8 *Urinary System*

View Set

Psychology of Personality Mid Term

View Set

Medical Terminology Practice: (5)

View Set

C790 Nursing Informatics (WGU), Unit 8 taxonomies, Unit 1 & 2 Define Health Informatics and theoretical Foundations/models, Unit 3, Unit 4 system Development Life Cycle., Unit 5 Project Management, Unit 7. Standardized Taxonomies, Unit 8 Taxonomies,...

View Set