Deck 4: Variables and Arithmetic Operations
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/111
Play
Full screen (f)
Deck 4: Variables and Arithmetic Operations
1
The memory allocation for the Char data type is ____ bytes.
A)2
B)4
C)8
D)16
A)2
B)4
C)8
D)16
A
2
A variable that will be used to contain only nondecimal whole numbers should be declared as a(n)____ data type.
A)Decimal
B)Double
C)Integer
D)Single
A)Decimal
B)Double
C)Integer
D)Single
C
3
The ____ indicates that a statement is an assignment statement.
A)keyword Set
B)ampersand (&)
C)equal sign (=)
D)keyword Assign
A)keyword Set
B)ampersand (&)
C)equal sign (=)
D)keyword Assign
C
4
The event handler of a button designated as the Cancel button will be processed when the user presses the ____ key on the keyboard.
A)ESC
B)ENTER
C)CTRL
D)ALT
A)ESC
B)ENTER
C)CTRL
D)ALT
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
5
A variable is ____.
A)a place where data is stored
B)a named location in RAM
C)defined in the coding of the program
D)a location in memory
A)a place where data is stored
B)a named location in RAM
C)defined in the coding of the program
D)a location in memory
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
6

As shown in the accompanying figure,the AcceptButton property of the form specifies which button will be activated when the ____ key on the keyboard is pressed.
A)F2
B)ENTER
C)ESC
D)CTRL
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
7
A ____ beneath a variable name in a declaration statement indicates that the variable is not referenced within the program.
A)blue squiggly underline
B)green squiggly underline
C)red squiggly underline
D)yellow squiggly underline
A)blue squiggly underline
B)green squiggly underline
C)red squiggly underline
D)yellow squiggly underline
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
8
The Double data type can store a ____.
A)floating-point number
B)very small negative number
C)huge positive number
D)value to the right of the decimal point
A)floating-point number
B)very small negative number
C)huge positive number
D)value to the right of the decimal point
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
9
A ____ can be represented by using the Char data type.
A)letter
B)very large number
C)punctuation symbol
D)symbol
A)letter
B)very large number
C)punctuation symbol
D)symbol
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
10
The CancelButton property of the Windows Form object allows you to specify which button is activated when the CTRL key on the keyboard is pressed._________________________
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
11
The Decimal data type can represent ____.
A)dollar amounts
B)very precise decimal numbers
C)large numbers
D)numbers accurate to 280 digits
A)dollar amounts
B)very precise decimal numbers
C)large numbers
D)numbers accurate to 280 digits
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
12
The prefix ____ should be used for naming a TextBox object.
A)tbox
B)txtbox
C)txt
D)obj
A)tbox
B)txtbox
C)txt
D)obj
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
13
____ is an arithmetic operation.
A)Comparison
B)Division
C)Addition
D)Multiplication
A)Comparison
B)Division
C)Addition
D)Multiplication
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
14
The Void procedure clears any data currently placed in the Text property of a TextBox object._________________________
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
15
A(n)green squiggly underline beneath a variable name in a declaration statement indicates that the variable is not references within the program._________________________
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
16
A(n)____ data type must be used in arithmetic operations.
A)string
B)numeric
C)character
D)either A or B
A)string
B)numeric
C)character
D)either A or B
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
17
The ampersand character at the end of a line in the code editor indicates that the line of code continues on the next line._________________________
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
18
When defining a variable to be used to hold textual information containing multiple characters,the declaration statement should have ____ at the end of the statement.
A)As Char
B)As Char Type
C)As String
D)As String Type
A)As Char
B)As Char Type
C)As String
D)As String Type
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
19
When defining a variable,the keyword ____ appears at the beginning of the statement.
A)Assign
B)Declare
C)Define
D)Dim
A)Assign
B)Declare
C)Define
D)Dim
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
20
A(n)PredefinedTextBox object can be used to control the format of data that a user enters._________________________
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
21
A prefix of ____ is used to denote that a variable has been defined as a Boolean data type.
A)tru
B)tfl
C)bln
D)trf
A)tru
B)tfl
C)bln
D)trf
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
22
A(n)____ variable should be used for values that will consist of a single character only.
A)Boolean
B)Char
C)Decimal
D)Integer
A)Boolean
B)Char
C)Decimal
D)Integer
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
23
Used with the ToString function,the ____ format specifier will display the value 8976.43561 as 8,976.44.
A)Fixed (F)
B)Number (N)
C)Currency (C)
D)General ( G)
A)Fixed (F)
B)Number (N)
C)Currency (C)
D)General ( G)
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
24
A prefix of ____ is used for variables defined as a String data type.
A)chr
B)wrd
C)str
D)txt
A)chr
B)wrd
C)str
D)txt
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
25
Used with the ToString function,the ____ format specifier will display the value 8976.43561 as 8976.44.
A)Fixed (F)
B)Number (N)
C)General (G)
D)Currency (C)
A)Fixed (F)
B)Number (N)
C)General (G)
D)Currency (C)
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
26
The ____ operator is used for exponentiation.
A)*
B)^
C)˜
D)\
A)*
B)^
C)˜
D)\
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
27
The ____ statement prevents automatic conversion of data types.
A)Manual Conversion On
B)Option Strict Off
C)Manual Conversion Off
D)Option Strict On
A)Manual Conversion On
B)Option Strict Off
C)Manual Conversion Off
D)Option Strict On
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
28
The ____ of a variable indicates how long the variable remains active.
A)lifetime
B)scope
C)range
D)duration
A)lifetime
B)scope
C)range
D)duration
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
29
When using ____ division (\),any remainder amount is dropped or truncated.
A)modular
B)integer
C)linear
D)decimal
A)modular
B)integer
C)linear
D)decimal
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
30
A prefix of ____ is used to denote a variable defined as a Decimal data type.
A)dec
B)dml
C)num
D)int
A)dec
B)dml
C)num
D)int
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
31
The \ operator is the arithmetic operator for ____ division.
A)integer
B)decimal
C)modular
D)linear
A)integer
B)decimal
C)modular
D)linear
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
32
A variable that will be used to hold only True or False values should be declared as a(n)____ data type.
A)Boolean
B)Decimal
C)Integer
D)Single
A)Boolean
B)Decimal
C)Integer
D)Single
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
33
The character D is the literal-type character for the ____ data type.
A)Single
B)Integer
C)Double
D)Decimal
A)Single
B)Integer
C)Double
D)Decimal
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
34
The dtm prefix is used to denote a(n)____ data type.
A)Boolean
B)Char
C)Single
D)Date
A)Boolean
B)Char
C)Single
D)Date
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
35
A prefix of ____ is used to denote a variable defined as an Integer data type
A)num
B)dec
C)nbr
D)int
A)num
B)dec
C)nbr
D)int
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
36
The character C is the literal-type character for the ____ data type.
A)Char
B)Short
C)Integer
D)Decimal
A)Char
B)Short
C)Integer
D)Decimal
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
37
The ____ of a variable specifies where a variable can be referenced within a program.
A)range
B)lifetime
C)scope
D)scale
A)range
B)lifetime
C)scope
D)scale
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
38
A variable that has been defined as a Single data type is denoted with the ____ prefix.
A)sng
B)sin
C)num
D)sge
A)sng
B)sin
C)num
D)sge
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
39
A prefix of ____ is used to denote a variable defined as a Char data type.
A)str
B)chr
C)txt
D)wrd
A)str
B)chr
C)txt
D)wrd
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
40
The prefix ____ should be used for a Double variable.
A)dbl
B)dub
C)dou
D)dob
A)dbl
B)dub
C)dou
D)dob
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
41
A TextBox object allows a user to enter programming code into the program during program execution.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
42
A String data type allows for the storing of the standard English letters only.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
43
Used with the ToString function,the ____ format specifier will display the value 8976.43561 as $8,976.44.
A)Fixed (F)
B)Number (N)
C)General (G)
D)Currency (C)
A)Fixed (F)
B)Number (N)
C)General (G)
D)Currency (C)
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
44
The style of the text displayed in a TextBox object can be set using the Font property.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
45
The maximum size of a TextBox object often is determined by the design of the user interface,so it looks and feels good in the user interface.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
46
When setting up a mask for a MaskedTextBox object,select the Use Validating Type check box to cause the object to verify that the user entered valid numeric data.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
47
Users always follow the expected path.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
48
Whenever data is stored in RAM,it does not need to be stored as a particular data type.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
49
A numeric data type must be used in arithmetic operations.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
50
A(n)____ Exception occurs when the user enters a value larger than the maximum value that can be processed by the statement.
A)Excessive input
B)MaxSize
C)Stack
D)Overflow
A)Excessive input
B)MaxSize
C)Stack
D)Overflow
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
51
Which of the following can be used to connect string text?
A)*
B)+
C)^
D)%
A)*
B)+
C)^
D)%
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
52
A ____ Exception occurs when the user enters data that a statement cannot process properly.
A)Style
B)Substance
C)Format
D)Setting
A)Style
B)Substance
C)Format
D)Setting
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
53
A(n)____ Exception occurs when a calculation creates a value larger than one that can be processed by a procedure.
A)Excessive input
B)MaxSize
C)Stack
D)Overflow
A)Excessive input
B)MaxSize
C)Stack
D)Overflow
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
54
When the user interacts with an object in the graphical user interface,the ____ shifts to that object.
A)scope
B)focus
C)visibility
D)precision
A)scope
B)focus
C)visibility
D)precision
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
55
The ____ operator is used to concatenate two strings.
A)&
B)#
C)@
D)^
A)&
B)#
C)@
D)^
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
56
A ____ Exception occurs when code attempts to divide a number by zero.
A)Divide by Zero
B)Zero denominator
C)Zero error
D)Division Error
A)Divide by Zero
B)Zero denominator
C)Zero error
D)Division Error
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
57
By default,a text box will display as many lines of text as the user enters.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
58
The variable name on the left of an assignment statement is the variable that receives the data that results from the evaluation of the expression on the right side of the assignment statement.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
59
The process of joining two string values together is called ____.
A)addition
B)alignment
C)combination
D)concatenation
A)addition
B)alignment
C)combination
D)concatenation
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
60
Used with the ToString function,the ____ format specifier will display the value 8976.43561 as 8976.43561.
A)Fixed (F)
B)Number (N)
C)General (G)
D)Currency (C)
A)Fixed (F)
B)Number (N)
C)General (G)
D)Currency (C)
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
61
A(n)____________________ text box allows the user to enter multiple lines in a text box.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
62
To force a literal value to be treated as a specific data type,you must use a literal-type character designator.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
63
A property identifies a value required by a procedure that must be passed into the procedure when it is called.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
64
A local variable is a variable that can only be accessed in the region in which it was defined.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
65
A procedure that does not return a value is called a function.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
66
The Option Strict On statement enables automatic data type conversions.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
67
Char variables can be used in arithmetic operations.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
68

As illustrated in the accompanying figure,the term ____________________ refers to a predefined layout for the data a user enters.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
69
Integer variables can be used to store fractional values.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
70
String data types can be used in arithmetic operations.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
71
You must enclose a value in parentheses to assign it to a variable declared as Char data type.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
72
Calculations are preformed from right to left,working towards the equal sign.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
73
A variable that can be used in multiple regions of code is called a universal variable.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
74
The ToString function requires a format specifier argument.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
75
MOD operations occur before any other arithmetic operations.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
76
The ____________________ property of a TextBox object controls the alignment of the text content.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
77
A Short data type is used for a very short string value of 10 bytes or less.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
78
A(n)____________________ object allows users to enter data into a program.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
79
An Overflow Exception will occur if the user enters a value greater than the maximum value that can be processed by the statement.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck
80

As shown in the accompanying figure,a(n)____________________ object allows you to specify the data format of the value typed into the text box.
Unlock Deck
Unlock for access to all 111 flashcards in this deck.
Unlock Deck
k this deck