Variables and Constants, Chapter 3 Mine
A variable of type Char is initialized to Nothing by default.
""
How many values can a variable store at one time?
1
What is the value of n if n = 15 Mod 4 ?
3
How many bytes are used to store an Integer variable?
4 bytes
What is the value of y if y = 23 \ 3 ?
7
Which data type declares a variable that stores a true or false value?
????
Which keyword does a constant declaration begin with?
Const
This data type is most appropriate for when declaring a variable representing the cost of something.
Decimal
Name at least six Visual Basic keywords.
Dim, Const, Integer, Double, Decimal, Nothing, etc..
This is not a valid identifier
Double
A Char assignment requires double-quotation marks (").
False
A constant value can be changed from its initial assignment.
False
A global declaration allows a variable to be accessible only in the procedure it is declared in.
False
A local declaration allows a variable to be accessible to any code in the Form class.
False
A module-level declaration is global to any code in the Form class.
False
A variable of type String is initialized to 0 by default.
False
An Integer variable that is declared but not initialized stores the value 1.
False
An identifier can contain spaces.
False
Identifiers are case sensitive.
False
If a value is large and could possibly have a decimal portion, Integer is the best data type choice.
False
It is good programming practice to keep the scope of variable declarations as wide as possible.
False
Keywords can be used as variable identifiers.
False
Modulus division truncates the decimal portion of the quotient to result in an integer.
False
The Integer data type requires more memory than the Double data type.
False
The value of a declared constant can be changed anywhere in the program code.
False
The & operator is used to assign a new value to a variable.
Integer
Which data type declares a variable that stores a positive or negative whole number?
Integer
Which type of error occurs in statements that are syntactically correct, but produce undesired or unexpected results?
Logic or semantic error
Which Visual Basic keyword is used to clear labels?
Nothing
This is a Visual Basic keyword
Private
This is not a Visual Basic keyword.
Start
A statement that violate the rules of Visual Basic generates what type of error?
Syntax
A breakpoint is a statement that has been marked as a stopping point.
True
A program with a semantic error will produce unexpected results.
True
A run-time error halts program execution at the statement that cannot be executed.
True
A run-time error is also called a syntax error.
True
A run-time error will occur if a text box contains data that does not match the variable type.
True
A value with a decimal portion is automatically rounded to a whole number when assigned to an Integer variable.
True
A variable can be declared and initialized in the same statement.
True
A variable is a name for a value stored in memory.
True
A variable must be declared before it is used.
True
A variable of type Double is initialized to 0 by default.
True
An error will be generated when hello is assigned to an Integer variable.
True
Debugging is the process of getting an application to work correctly.
True
Grouping variables together in a single statement is good programming style only when the variables represent related items.
True
In Visual Basic, widget and Widget refer to the same variable.
True
In a numeric expression, integer division is performed after modulus division.
True
Logic errors must be found by the programmer.
True
Multiple variables with different data types can be declared in a single statement.
True
Nothing is a keyword.
True
The Val() function converts text box data to a numeric value.
True
The statement Dim Function As Integer will generate a syntax error.
True
The value of a constant can be assigned only in the declaration.
True
The value of a variable is changed through assignment.
True
Values represented by the Double data type are referred to as floating point.
True
A named memory location which stores a value that cannot be changed from its initial assignment is called a
constant
The TextBox control Text property
determines what text is displayed in the text box.
What should be used to let a user know what input is expected in an application?
prompt
This is a valid identifier
side