Deck 3: Processing Data

Full screen (f)
exit full mode
Question
The TextBox tool is located in the ____________ group of the Toolbox.

A) Common Controls
B) Dialog
C) Components
D) Containers
Use Space or
up arrow
down arrow
to flip the card.
Question
A common operation that performed on strings is ____________, or appending one string to the end of another string.

A) extending
B) combination
C) concatenation
D) affixing
Question
Assuming a string variable named city has already been declared, which one of the following statements assigns the string literal "Vienna" to the variable?

A) "Vienna" = city;
B) city + "Vienna";
C) city("Vienna");
D) city = "Vienna";
Question
Fundamental types of data, such as strings, integers, and real numbers are known as ____________.

A) fundamental data types
B) primitive data types
C) natural data types
D) basic data types
Question
A variable's declaration statement must appear ____________ any other statements in the method that use the variable.

A) after
B) before
C) near
D) in
Question
A(n) ____________ identifies a variable in the program code.

A) compiler signature
B) variable name
C) identifying bit
D) hash tag
Question
A(n) ____________ specifies a variable's name and data type.

A) variable declaration
B) data indicator
C) object tag
D) source entity
Question
A(n) ____________ control is a rectangular area on the form that can accept keyboard input from the user.

A) Label
B) PictureBox
C) Input
D) TextBox
Question
A(n) ____________ is a storage location in memory that is represented by a name.

A) declaration
B) sector
C) variable
D) instance
Question
In code, if you want to retrieve the data that has been typed into a TextBox, you simply retrieve the contents of the control's ____________ property.

A) Output
B) String
C) Text
D) Data
Question
Which one of the following statements declares a string variable named message?

A) message string;
B) string = message;
C) string message;
D) string + message;
Question
When the user types into a TextBox control, the text is stored in the control's ____________ property.

A) Text
B) Input
C) String
D) Value
Question
A variable's ____________ indicates the type of data that the variable will hold.

A) name
B) location in memory
C) data type
D) assignment value
Question
Which one of the following is the general format for a variable declaration statement?

A) VariableName DataType;
B) DataType VariableName;
C) DataName VariableType;
D) NameType VaraibleData;
Question
A(n) ____________ variable belongs to the method in which it is declared, and only statements inside that method can access the variable.

A) limited
B) local
C) global
D) static
Question
Assuming a string variable named movieTitle has already been declared, which one of the following statements combines the strings "The " and "Hobbit" and then assigns the resulting string to the variable?

A) movieTitle("The ", "Hobbit");
B) "The " + "Hobbit" = moveTitle;
C) movieTitle = "The " & "Hobbit";
D) movieTitle = "The " + "Hobbit";
Question
The ____________ operator produces a string that is the combination of the two strings used as its operands.

A) +
B) =
C) *
D) &
Question
A variable of the ____________ data type can hold any string of characters, such as a person's name, address, password, and so on.

A) int
B) double
C) string
D) decimal
Question
Which one of the following statements clears the Text property of a TextBox control named addressTextBox?

A) addressTextBox.Text = Text.Clear;
B) addressTextBox.Text = "";
C) addressTextBox = Nothing;
D) addressTextBox.Empty();
Question
Which one of the following statements assigns the value contained in the Text property of a TextBox control named ageTextBox to the Text Property of a Label control named ageLabel?

A) ageLabel = ageTextBox;
B) ageTextBox.Text = ageLabel.Text;
C) ageLabel.Text = ageTextBox.Text;
D) ageTextBox = ageLabel;
Question
Which one of the following statements initializes a variable with an integer literal?

A) int score = 2500;
B) decimal total = 156.78m;
C) double rate = 0.00435;
D) string name = "Michelle";
Question
You can assign a value to a variable only if the value is compatible with the variable's ____________.

A) data type
B) name
C) scope
D) lifetime
Question
Which one of the following statements declares the string variables city, state, and zip using a single declaration statement?

A) string city, state, zip;
B) string city, string state, string zip;
C) string city; state; zip;
D) string city_state_zip;
Question
You cannot declare two variables with the same ____________ in the same scope.

A) lifetime
B) data type
C) name
D) value
Question
A numeric literal that is treated as an int is called a(n) ____________.

A) real number
B) integer literal
C) natural literal
D) common value
Question
The ____________ data type is used to store any number that might have a fractional part.

A) string
B) int
C) double
D) decimal
Question
When declaring multiple variables with one declaration statement, use ____________ to separate the variable names.

A) semicolons (;)
B) underscores (_)
C) asterisks (*)
D) commas (,)
Question
A ____________ is a number that is written into the programs code.

A) numeric literal
B) binary constant
C) real value
D) source digit
Question
When you append the letter M or m to a numeric literal it is referred to as a ____________.

A) monetary literal
B) double literal
C) decimal literal
D) mnemonic literal
Question
One way to make sure that a variable has been assigned a value is to ___________ the variable with a value when you declare it.

A) initialize
B) instantiate
C) concatenate
D) compare
Question
A ____________ holds only one value at a time.

A) program
B) data type
C) method
D) variable
Question
A variable of the ____________ data type can hold whole numbers only.

A) string
B) int
C) double
D) decimal
Question
A ____________ variable's scope begins at the variable's declaration and ends at the end of the method in which the variable is declared.

A) global
B) static
C) local
D) basic
Question
Which one of the following statements initializes a variable with a double literal?

A) string modelNumber = "R2C32";
B) double percentage = 23.59;
C) int width = 150;
D) decimal bonus = 0.99m;
Question
The ____________ is commonly used in financial applications because it can store real numbers with a great deal of precision.

A) string
B) int
C) double
D) decimal
Question
A variable's ____________ is the time period during which the variable exists in memory while the program is executing.

A) span
B) lifetime
C) instance
D) latency
Question
Which one of the following statements initializes the color variable with the string "red"?

A) color = "red";
B) string color = "red";
C) "red" = string color;
D) string color("red");
Question
When typing most statements, you can simply press the ____________ key when you reach an appropriate point to continue the statement on the next line.

A) Enter
B) Tab
C) X
D) Shift
Question
A numeric literal that is written with a decimal point is called a ____________.

A) real number
B) floating-point value
C) decimal literal
D) double literal
Question
Programmers use the term ____________ to describe the part of a program in which a variable may be accessed.

A) scope
B) lifetime
C) method
D) accessibility
Question
A programmer's tools for performing calculations are ____________.

A) variables
B) controls
C) math operators
D) expressions
Question
Parts of a mathematical expression may be grouped with ____________ to force some operations to be performed before others.

A) parentheses
B) double quotation marks
C) braces
D) semicolons
Question
The values on the right and left of a math operator are called ____________.

A) factors
B) derivatives
C) operands
D) identities
Question
You cannot assign a double or a decimal value to an int variable because such an assignment could result in ____________.

A) buffer overflow
B) compiler parse errors
C) a loss of data
D) value sharing conflicts
Question
Which one of the following statements initializes a variable with a decimal literal?

A) string displayPrice = "$14.99";
B) decimal budget = 450m;
C) int inventory = 150;
D) double volume = 30.25;
Question
Which one of the following assignment statements, for variables of the decimal data type, will cause an error?

A) decimal cost = 0.99m;
B) decimal retail = 100;
C) decimal wholesale = 50.0;
D) decimal fee = 0.01m;
Question
When an operation is performed on two int values, the result will be a(n) ____________.

A) decimal
B) double
C) string
D) int
Question
When a math expression involves an int and a decimal, the int is temporarily converted to a(n) ____________, and the result is a decimal.

A) decimal
B) double
C) string
D) int
Question
Which one of the following assignment statements, for variables of the double data type, will cause an error?

A) double density = 34.12;
B) double length = 0.5;
C) double bonus = 24.95m;
D) double depth = 1200;
Question
C# offers a special set of operators known as ____________ that are designed specifically for changing the value of a variable without having to type the variable name twice.

A) identity operators
B) combined assignment operators
C) quick-change operators
D) assessment operators
Question
Look at the following code: int distance; // Declare distance as an int
Double half; // Declare half as a double
Distance = 35; // Assign 35 to distance
Half = distance / 2; // Calculate half the distance
What is the value that is assigned to the half variable?

A) 70
B) 17.5
C) 18
D) 17
Question
When an operation is performed on two double values, the result will be a(n) ____________.

A) int
B) double
C) string
D) decimal
Question
The ____________ dictates which operations are performed first in a mathematical expression.

A) least significant value
B) order of operations
C) compiler version
D) operator position
Question
The process of dropping a number's fractional part is called ____________.

A) rounding
B) diminution
C) reduction
D) truncation
Question
Math expression involving a double and a(n) ____________ are not allowed unless a cast operator is used to convert one of the operands.

A) int
B) double
C) decimal
D) All of these
Question
When an operation is performed on two decimal values, the result will be a(n) ____________.

A) string
B) int
C) decimal
D) double
Question
You can use a(n) ____________ to explicitly convert a value from one numeric data type to another, even if the conversion might result in a loss of data.

A) cast operator
B) conversion formula
C) data binding
D) explicit operator
Question
A(n) ____________ performs a calculation and gives a value.

A) math expression
B) algorithm
C) data utility
D) variable
Question
To convert a string to any of the numeric data types, we use a family of methods in the .NET Framework known as the ____________.

A) Convert methods
B) itoa methods
C) ToString methods
D) Parse methods
Question
When a math expression involves an int and a double, the int is temporarily converted to a(n) ____________, and the result is a double.

A) int
B) decimal
C) string
D) double
Question
The ____________ contains one or more statements that can potentially throw an exception.

A) break block
B) catch block
C) try block
D) run block
Question
____________ ("P" or "p") causes the number to be multiplied by 100 and displayed with a trailing space and % sign.

A) Percent format
B) Currency format
C) Exponential format
D) Number format
Question
In C#, an exception handler is written with the ____________ statement.

A) try-catch
B) catch-try
C) run-break
D) break-run
Question
When you pass the formatting string ____________ to the ToString method, the number is displayed with comma separators and a decimal point.

A) "E" or "e"
B) "C" or "c"
C) "N" or "n"
D) "F" or "f"
Question
In C#, all variables have a(n) ____________ method that you can call to convert the variable's value to a string.

A) ToString
B) Convert
C) Parse
D) Text
Question
The ____________ method can be used to convert a string to a decimal.

A) decimal.ToString
B) Parse.decimal
C) ToString.decimal
D) decimal.Parse
Question
When using the ____________ operator, if one operand is a number and the other operand is a string, the number will be implicitly converted to a string, and both operands will be concatenated.

A) &
B) *
C) /
D) +
Question
____________ ("E" or "e") displays numeric values in scientific notation.

A) Number format
B) Percent format
C) Currency format
D) Exponential format
Question
A(n) ____________ is an unexpected error that occurs while a program is running, causing the program to halt if the error is not properly dealt with.

A) bug
B) exception
C) logic error
D) illegal operation
Question
Code that responds to exceptions when they are thrown and prevents the program from abruptly crashing is called a(n) _____________.

A) catch-all
B) debugger
C) exception handler
D) critical state handler
Question
When you call the ToString method, you can optionally pass a(n) ____________ as an argument to the method to indicate that you want the number to appear formatted in a specific way when it is returned as a string from the method.

A) formatting string
B) style specifier
C) output value
D) design element
Question
In computer science, the term ____________ typically means to analyze a string of characters for some purpose.

A) compile
B) decrypt
C) scan
D) parse
Question
You can use the ____________ formatting strings with integers to specify the minimum width for displaying the number.

A) "D" or "d"
B) "E" or "e"
C) "F" or "f"
D) "P" or "p"
Question
When an exception is thrown, the application stops running and Visual Studio goes into a special mode known as ____________.

A) debug mode
B) break mode
C) exception mode
D) validation mode
Question
The ____________ method can be used to convert a string to an int.

A) int.Parse
B) Parse.int
C) Parse.ToString.int
D) ToString.Parse.int
Question
When you pass the formatting string ____________ to the ToString method, the number is returned formatted as currency.

A) "C" or "c"
B) "F" or "f"
C) "E" or "e"
D) "N" or "n"
Question
You can call the ToString method using the following general format:

A) ToString.variableName()
B) ToString(variableName)
C) variableName.ToString()
D) To.variableName.String()
Question
A piece of data that is passed into a method is known as a(n) ____________.

A) argument
B) delimiter
C) descriptor
D) factor
Question
____________ ("F" or "f") displays numeric values with no thousands separator and a decimal point.

A) Number format
B) Fixed-Point format
C) Exponential format
D) Percent format
Question
The ____________ method can be used to convert a string to a double.

A) Parse.double
B) double.Parse
C) ToString.double
D) double.ToString
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/174
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 3: Processing Data
1
The TextBox tool is located in the ____________ group of the Toolbox.

A) Common Controls
B) Dialog
C) Components
D) Containers
A
2
A common operation that performed on strings is ____________, or appending one string to the end of another string.

A) extending
B) combination
C) concatenation
D) affixing
C
3
Assuming a string variable named city has already been declared, which one of the following statements assigns the string literal "Vienna" to the variable?

A) "Vienna" = city;
B) city + "Vienna";
C) city("Vienna");
D) city = "Vienna";
D
4
Fundamental types of data, such as strings, integers, and real numbers are known as ____________.

A) fundamental data types
B) primitive data types
C) natural data types
D) basic data types
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
5
A variable's declaration statement must appear ____________ any other statements in the method that use the variable.

A) after
B) before
C) near
D) in
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
6
A(n) ____________ identifies a variable in the program code.

A) compiler signature
B) variable name
C) identifying bit
D) hash tag
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
7
A(n) ____________ specifies a variable's name and data type.

A) variable declaration
B) data indicator
C) object tag
D) source entity
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
8
A(n) ____________ control is a rectangular area on the form that can accept keyboard input from the user.

A) Label
B) PictureBox
C) Input
D) TextBox
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
9
A(n) ____________ is a storage location in memory that is represented by a name.

A) declaration
B) sector
C) variable
D) instance
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
10
In code, if you want to retrieve the data that has been typed into a TextBox, you simply retrieve the contents of the control's ____________ property.

A) Output
B) String
C) Text
D) Data
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
11
Which one of the following statements declares a string variable named message?

A) message string;
B) string = message;
C) string message;
D) string + message;
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
12
When the user types into a TextBox control, the text is stored in the control's ____________ property.

A) Text
B) Input
C) String
D) Value
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
13
A variable's ____________ indicates the type of data that the variable will hold.

A) name
B) location in memory
C) data type
D) assignment value
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
14
Which one of the following is the general format for a variable declaration statement?

A) VariableName DataType;
B) DataType VariableName;
C) DataName VariableType;
D) NameType VaraibleData;
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
15
A(n) ____________ variable belongs to the method in which it is declared, and only statements inside that method can access the variable.

A) limited
B) local
C) global
D) static
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
16
Assuming a string variable named movieTitle has already been declared, which one of the following statements combines the strings "The " and "Hobbit" and then assigns the resulting string to the variable?

A) movieTitle("The ", "Hobbit");
B) "The " + "Hobbit" = moveTitle;
C) movieTitle = "The " & "Hobbit";
D) movieTitle = "The " + "Hobbit";
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
17
The ____________ operator produces a string that is the combination of the two strings used as its operands.

A) +
B) =
C) *
D) &
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
18
A variable of the ____________ data type can hold any string of characters, such as a person's name, address, password, and so on.

A) int
B) double
C) string
D) decimal
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
19
Which one of the following statements clears the Text property of a TextBox control named addressTextBox?

A) addressTextBox.Text = Text.Clear;
B) addressTextBox.Text = "";
C) addressTextBox = Nothing;
D) addressTextBox.Empty();
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
20
Which one of the following statements assigns the value contained in the Text property of a TextBox control named ageTextBox to the Text Property of a Label control named ageLabel?

A) ageLabel = ageTextBox;
B) ageTextBox.Text = ageLabel.Text;
C) ageLabel.Text = ageTextBox.Text;
D) ageTextBox = ageLabel;
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
21
Which one of the following statements initializes a variable with an integer literal?

A) int score = 2500;
B) decimal total = 156.78m;
C) double rate = 0.00435;
D) string name = "Michelle";
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
22
You can assign a value to a variable only if the value is compatible with the variable's ____________.

A) data type
B) name
C) scope
D) lifetime
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
23
Which one of the following statements declares the string variables city, state, and zip using a single declaration statement?

A) string city, state, zip;
B) string city, string state, string zip;
C) string city; state; zip;
D) string city_state_zip;
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
24
You cannot declare two variables with the same ____________ in the same scope.

A) lifetime
B) data type
C) name
D) value
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
25
A numeric literal that is treated as an int is called a(n) ____________.

A) real number
B) integer literal
C) natural literal
D) common value
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
26
The ____________ data type is used to store any number that might have a fractional part.

A) string
B) int
C) double
D) decimal
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
27
When declaring multiple variables with one declaration statement, use ____________ to separate the variable names.

A) semicolons (;)
B) underscores (_)
C) asterisks (*)
D) commas (,)
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
28
A ____________ is a number that is written into the programs code.

A) numeric literal
B) binary constant
C) real value
D) source digit
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
29
When you append the letter M or m to a numeric literal it is referred to as a ____________.

A) monetary literal
B) double literal
C) decimal literal
D) mnemonic literal
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
30
One way to make sure that a variable has been assigned a value is to ___________ the variable with a value when you declare it.

A) initialize
B) instantiate
C) concatenate
D) compare
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
31
A ____________ holds only one value at a time.

A) program
B) data type
C) method
D) variable
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
32
A variable of the ____________ data type can hold whole numbers only.

A) string
B) int
C) double
D) decimal
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
33
A ____________ variable's scope begins at the variable's declaration and ends at the end of the method in which the variable is declared.

A) global
B) static
C) local
D) basic
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
34
Which one of the following statements initializes a variable with a double literal?

A) string modelNumber = "R2C32";
B) double percentage = 23.59;
C) int width = 150;
D) decimal bonus = 0.99m;
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
35
The ____________ is commonly used in financial applications because it can store real numbers with a great deal of precision.

A) string
B) int
C) double
D) decimal
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
36
A variable's ____________ is the time period during which the variable exists in memory while the program is executing.

A) span
B) lifetime
C) instance
D) latency
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
37
Which one of the following statements initializes the color variable with the string "red"?

A) color = "red";
B) string color = "red";
C) "red" = string color;
D) string color("red");
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
38
When typing most statements, you can simply press the ____________ key when you reach an appropriate point to continue the statement on the next line.

A) Enter
B) Tab
C) X
D) Shift
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
39
A numeric literal that is written with a decimal point is called a ____________.

A) real number
B) floating-point value
C) decimal literal
D) double literal
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
40
Programmers use the term ____________ to describe the part of a program in which a variable may be accessed.

A) scope
B) lifetime
C) method
D) accessibility
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
41
A programmer's tools for performing calculations are ____________.

A) variables
B) controls
C) math operators
D) expressions
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
42
Parts of a mathematical expression may be grouped with ____________ to force some operations to be performed before others.

A) parentheses
B) double quotation marks
C) braces
D) semicolons
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
43
The values on the right and left of a math operator are called ____________.

A) factors
B) derivatives
C) operands
D) identities
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
44
You cannot assign a double or a decimal value to an int variable because such an assignment could result in ____________.

A) buffer overflow
B) compiler parse errors
C) a loss of data
D) value sharing conflicts
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
45
Which one of the following statements initializes a variable with a decimal literal?

A) string displayPrice = "$14.99";
B) decimal budget = 450m;
C) int inventory = 150;
D) double volume = 30.25;
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
46
Which one of the following assignment statements, for variables of the decimal data type, will cause an error?

A) decimal cost = 0.99m;
B) decimal retail = 100;
C) decimal wholesale = 50.0;
D) decimal fee = 0.01m;
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
47
When an operation is performed on two int values, the result will be a(n) ____________.

A) decimal
B) double
C) string
D) int
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
48
When a math expression involves an int and a decimal, the int is temporarily converted to a(n) ____________, and the result is a decimal.

A) decimal
B) double
C) string
D) int
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
49
Which one of the following assignment statements, for variables of the double data type, will cause an error?

A) double density = 34.12;
B) double length = 0.5;
C) double bonus = 24.95m;
D) double depth = 1200;
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
50
C# offers a special set of operators known as ____________ that are designed specifically for changing the value of a variable without having to type the variable name twice.

A) identity operators
B) combined assignment operators
C) quick-change operators
D) assessment operators
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
51
Look at the following code: int distance; // Declare distance as an int
Double half; // Declare half as a double
Distance = 35; // Assign 35 to distance
Half = distance / 2; // Calculate half the distance
What is the value that is assigned to the half variable?

A) 70
B) 17.5
C) 18
D) 17
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
52
When an operation is performed on two double values, the result will be a(n) ____________.

A) int
B) double
C) string
D) decimal
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
53
The ____________ dictates which operations are performed first in a mathematical expression.

A) least significant value
B) order of operations
C) compiler version
D) operator position
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
54
The process of dropping a number's fractional part is called ____________.

A) rounding
B) diminution
C) reduction
D) truncation
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
55
Math expression involving a double and a(n) ____________ are not allowed unless a cast operator is used to convert one of the operands.

A) int
B) double
C) decimal
D) All of these
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
56
When an operation is performed on two decimal values, the result will be a(n) ____________.

A) string
B) int
C) decimal
D) double
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
57
You can use a(n) ____________ to explicitly convert a value from one numeric data type to another, even if the conversion might result in a loss of data.

A) cast operator
B) conversion formula
C) data binding
D) explicit operator
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
58
A(n) ____________ performs a calculation and gives a value.

A) math expression
B) algorithm
C) data utility
D) variable
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
59
To convert a string to any of the numeric data types, we use a family of methods in the .NET Framework known as the ____________.

A) Convert methods
B) itoa methods
C) ToString methods
D) Parse methods
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
60
When a math expression involves an int and a double, the int is temporarily converted to a(n) ____________, and the result is a double.

A) int
B) decimal
C) string
D) double
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
61
The ____________ contains one or more statements that can potentially throw an exception.

A) break block
B) catch block
C) try block
D) run block
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
62
____________ ("P" or "p") causes the number to be multiplied by 100 and displayed with a trailing space and % sign.

A) Percent format
B) Currency format
C) Exponential format
D) Number format
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
63
In C#, an exception handler is written with the ____________ statement.

A) try-catch
B) catch-try
C) run-break
D) break-run
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
64
When you pass the formatting string ____________ to the ToString method, the number is displayed with comma separators and a decimal point.

A) "E" or "e"
B) "C" or "c"
C) "N" or "n"
D) "F" or "f"
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
65
In C#, all variables have a(n) ____________ method that you can call to convert the variable's value to a string.

A) ToString
B) Convert
C) Parse
D) Text
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
66
The ____________ method can be used to convert a string to a decimal.

A) decimal.ToString
B) Parse.decimal
C) ToString.decimal
D) decimal.Parse
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
67
When using the ____________ operator, if one operand is a number and the other operand is a string, the number will be implicitly converted to a string, and both operands will be concatenated.

A) &
B) *
C) /
D) +
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
68
____________ ("E" or "e") displays numeric values in scientific notation.

A) Number format
B) Percent format
C) Currency format
D) Exponential format
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
69
A(n) ____________ is an unexpected error that occurs while a program is running, causing the program to halt if the error is not properly dealt with.

A) bug
B) exception
C) logic error
D) illegal operation
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
70
Code that responds to exceptions when they are thrown and prevents the program from abruptly crashing is called a(n) _____________.

A) catch-all
B) debugger
C) exception handler
D) critical state handler
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
71
When you call the ToString method, you can optionally pass a(n) ____________ as an argument to the method to indicate that you want the number to appear formatted in a specific way when it is returned as a string from the method.

A) formatting string
B) style specifier
C) output value
D) design element
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
72
In computer science, the term ____________ typically means to analyze a string of characters for some purpose.

A) compile
B) decrypt
C) scan
D) parse
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
73
You can use the ____________ formatting strings with integers to specify the minimum width for displaying the number.

A) "D" or "d"
B) "E" or "e"
C) "F" or "f"
D) "P" or "p"
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
74
When an exception is thrown, the application stops running and Visual Studio goes into a special mode known as ____________.

A) debug mode
B) break mode
C) exception mode
D) validation mode
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
75
The ____________ method can be used to convert a string to an int.

A) int.Parse
B) Parse.int
C) Parse.ToString.int
D) ToString.Parse.int
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
76
When you pass the formatting string ____________ to the ToString method, the number is returned formatted as currency.

A) "C" or "c"
B) "F" or "f"
C) "E" or "e"
D) "N" or "n"
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
77
You can call the ToString method using the following general format:

A) ToString.variableName()
B) ToString(variableName)
C) variableName.ToString()
D) To.variableName.String()
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
78
A piece of data that is passed into a method is known as a(n) ____________.

A) argument
B) delimiter
C) descriptor
D) factor
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
79
____________ ("F" or "f") displays numeric values with no thousands separator and a decimal point.

A) Number format
B) Fixed-Point format
C) Exponential format
D) Percent format
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
80
The ____________ method can be used to convert a string to a double.

A) Parse.double
B) double.Parse
C) ToString.double
D) double.ToString
Unlock Deck
Unlock for access to all 174 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 174 flashcards in this deck.