Shared Flashcard Set

Details

Final Exam Questions
The Final Exam in Introduction to Computer Programming: Basics is over quizzes one through four.
106
Computer Science
04/14/2011

Additional Computer Science Flashcards

 


 

Cards

Term
An Expression
Definition
The right side of an assignment statement will hold:
Term
Both A and B (an object property and a variable.)
Definition
 The left side of an assignment statement will hold:
Term
Dim myForm As Integer
Definition
 Which is a valid statement for declaring a variable?
Term
Both A and B (Integer and Floating Point.)
Definition
 Which is a numeric data type?
Term
True
Definition
The TextBox can both get input from the user and give output to the user.
Term
True
Definition
A dialog box is like a pop-up window that gets input from and provides output to the end user.
Term
True
Definition
The equal sign (=) is used both as a comparison operator and an assignment operator.
Term
True
Definition
Term
False
Definition
Term
False
Definition
 If X = 2 and Y = 6, then 4 + Y / X = 5.
Term
True
Definition
If X = 3 and Y = 2, then X ^ 2 * Y = 18.
Term
True
Definition
 Using comparison operators will always result in a logical output.
Term
False
Definition
Using arithmetic operators will always result in a logical output.
Term
True
Definition
 Variables, constants, and operators are combined to form expressions.
Term
True
Definition
You can declare more than one variable with a single Dim statement.
Term
False
Definition
 Boolean data types have three possible values: true, false, or null.
Term
False
Definition
There are two types of integer data types: numeric and floating point.
Term
True
Definition
Every variable has a name, data value, and data type.
Term
True
Definition
Document remarks are comments found at the beginning of a project file that state the author, purpose, and creation date of the project.
Term
Integer Remainder
Definition
 The term MOD is used for:
Term
14
Definition
What is the correct result of the equation: 2 + 3 * 4?
Term
16
Definition
What is the correct result of the equation: 2 * 2 ^ 3?
Term

All of the above are appropriate rules for naming variables.

(Use a descriptive name for the variable; do not use a reserved programming language word as a variable; Use nothing but letters, digits, or the underscore character; Start the name of a variable with a letter)


Definition
Which is not a rule for naming variables?
Term
language used to create a computer program.
Definition
Syntax refers to the:
Term
logical design of a computer program.
Definition
An algorithm is the:
Term
False
Definition
The operations of Division and Integer Division have the same precedence.
Term
True
Definition
The Exponentiation Operation has the highest precedence.
Term
True
Definition
The programmer can change the operator precedence by using parentheses.
Term
True
Definition
A flow chart is a graphical representation of a program's logic.
Term
False
Definition
A variable has two parts, a name and the data value, both of which can change while the program is running.
Term
True
Definition
The assignment statement has two parts: an expression and a variable.
Term
True
Definition
GUI stands for Graphical User Interface.
Term
True
Definition
The Designer Window holds the forms that belong to the project.
Term
False
Definition
Controls, such as buttons and labels, can be found in the Toolbar.
Term
False
Definition
Comments begin with the double quote symbol (").
Term
True
Definition
Visual Basic allows developers to quickly create a Windows application by using pre-built components.
Term
True
Definition
Two examples of pre-built graphical objects are Forms and Controls.
Term
True
Definition
Visual Basic is considered a Rapid Application Development system because it is easy to create new Windows application with the reuse of existing objects.
Term
False
Definition
The only way to write a comment in Visual Basic is to use the single quote (').
Term
False
Definition
There are three blocks of statements in an IF statement.
Term
True
Definition

For the following questions, evaluate the compound conditions based on X = 4, Y = 7, and Z = 4.


(Z = 6) OR (Y=7)

Term
True
Definition
 All conditions of an IF statement can evaluate to a Boolean expression.
Term
False
Definition

For the following questions, evaluate the conditions based on C = 10, D = 3, and E = 8.


C = D

Term
True
Definition

For the following questions, evaluate the conditions based on C = 10, D = 3, and E = 8.


D <> E

Term
True
Definition

For the following questions, evaluate the conditions based on C = 10, D = 3, and E = 8.


C > E

Term
False
Definition

For the following questions, evaluate the conditions based on C = 10, D = 3, and E = 8.


C < D

Term
False
Definition

For the following questions, evaluate the conditions based on C = 10, D = 3, and E = 8.


D >= E

Term
False
Definition

 

 
For the following questions, evaluate the conditions based on C = 10, D = 3, and E = 8.


C <= E

Term
True
Definition
 The logical operator joins two conditions.
Term
True
Definition
The OR operator is a logical operator.
Term
True
Definition

 For the following questions, evaluate the compound conditions based on X = 4, Y = 7, and Z = 4.


NOT (Z = 5)

Term
False
Definition

 For the following questions, evaluate the compound conditions based on X = 4, Y = 7, and Z = 4.


(X = Z) AND (X = Y)

Term
True
Definition

For the following questions, evaluate the compound conditions based on X = 4, Y = 7, and Z = 4.


(X = Z) AND (Y = 7)

Term
True
Definition

For the following questions, evaluate the compound conditions based on X = 4, Y = 7, and Z = 4.


(Z = 6) OR (Y=7)

Term
A <> B
Definition
For A = 4 and B = 8 which evaluates as true?
Term
A >= B
Definition
 For A = 4 and B = 4 which evaluates as true?
Term

Logical Operator

 

Definition
What does a compound condition use to join two conditions?
Term

Superficial

 

Definition
Which is not a type of error programmers look for?
Term
Signals the end of a list of data
Definition
A sentinel value:
Term
A block of statements is executed a known number of times
Definition
 The For...Next Loop is used when:
Term
True
Definition
Each For loop has an initial, final and step value.
Term
False
Definition
 If you don't initialize a counter or accumulator, the program will fail.
Term
False
Definition
 To use a While Loop the programmer must know how many times the body of the loop will be executed.
Term
True
Definition
A sentinel value is used to indicate that the user is done inputting data.
Term
True
Definition
Processing the number of students in a class is best done with a While loop because the number of students might change.
Term

False

 

Definition
 The body of the While loop will not run if the condition evaluates to true.
Term
False
Definition
The difference between the pre-test and post-test While loop is that the pre-test will always go through the body of the loop at least once before testing the condition statement.
Term
True
Definition
A nested loop is a loop inside the body of another loop.
Term
True
Definition
The Count variable of an outer loop can be used as the Final value of an inner loop.
Term
False
Definition
Only a loop of the same type can be used as an inner loop.
Term
Counters and accumalators are typically found inside loops.
Definition
Which statement is true?
Term
Counters are updated by 1; accumalators are updated by the value of a variable
Definition
Which statement is true? .
Term

All are valid types of statements

(other loops; assignment; input; output)

Definition
Which type of statement cannot be run inside a loop?
Term
True
Definition
If a While condition evaluates to true the loop will continue.
Term
True
Definition
Any For...Next statement can be re-written as a Do...Loop.
Term
False
Definition
Negative values are not allowed for the stepvalue.
Term
True
Definition
The For...Next loop exits when the loop variable exceeds the end value.
Term
True
Definition
Logic errors are the hardest types to find.
Term
1
Definition
 In the For...Next statement the default value for the Step is:
Term

Both A and B

(creating controls and assigning them to the array; assigning existing controls to the array)

Definition
 An array of controls can be populated by:
Term
Modular Programming
Definition
The methodology where code is broken into small, logical procedures is called:
Term

All of the above

(sub; event; function)

Definition
Which is a type of procedure found in VB.Net?
Term
True
Definition
An array can hold controls as their datatype.
Term
True
Definition
An array consists of multiple elements.
Term
True
Definition
A function can act like an expression in an assignment statement.
Term
True
Definition
Double clicking on a Button control in the Designer window will automatically create a click event procedure stub in the Code Editor window.
Term
True
Definition
The upper bound is the highest index value in an array.
Term
True
Definition
In a zero base array the upper bound is one less than the length of the array.
Term
True
Definition
Arrays are composed of multiple elements.
Term
False
Definition
Indexes hold the data values of an array.
Term
False
Definition
 The first index of an array is typically has a value of 1.
Term
True
Definition
The default value of the elements in an array is set to 0.
Term
True
Definition
An element in an array is identified by an index value in parentheses after the array name.
Term
False
Definition
If no element is specified by an index value after the array name the first element of the array will be returned.
Term
True
Definition
An out-of-bounds error is generated when the index value is larger than the upper bound.
Term
False
Definition
The index of an array can be an integer constant or expression, but not a variable.
Term
True
Definition
For Loops are used to cycle through every element in an array.
Term
The array length is one larger than the upper bound
Definition
In a zero based array:
Term

Both A and B

(a collection of related data items; a collection of data elements)

Definition
An array is:
Term
Index
Definition
Each element has its own:
Term
Integer
Definition
An index can be of the data type:
Term

All of the above

(constant; expression; variable)

Definition
Which can be used as an index in an array?
Term
An out-of-bounds error will occur
Definition
 If the index value is larger than the upper bound then:
Term
For loops
Definition
 Arrays are especially useful in conjunction with:
Term
True
Definition
 Procedures make it possible to create modular programming.
Term
False
Definition
Once a procedure is called during the lifetime of the program, it cannot be called again.