Deck 2: Using Data

Full screen (f)
exit full mode
Question
You declare a Boolean variable by using type ____.

A) char
B) bool
C) int
D) boolean
Use Space or
up arrow
down arrow
to flip the card.
Question
In the C# statement moneyString = someMoney.ToString("F3") , the expression F3 is an example of a(n) ____.

A) literal constant
B) standard numeric format string
C) named constant
D) intrinsic type
Question
In C#, you use the ____ data type to hold a series of characters.

A) int
B) string
C) sbyte
D) char
Question
+= is the C# ____ operator; it adds the operand on the right to the operand on the left and assigns it to the operand on the left in one step.

A) prefix increment
B) postfix increment
C) add and assign
D) increment and assign
Question
The equal sign ( = ) is the C# assignment operator.
Question
A(n) ____ arithmetic operator has one argument to the left and another argument to the right of the operator.

A) binary
B) complex
C) composite
D) unary
Question
A(n) ____ is a named location in computer memory that can hold different values at different points in time.

A) variable
B) constant
C) literal constant
D) alias
Question
someValue++ is an example of the use of the prefix increment operator.
Question
An expression containing a(n) ____ operator has a Boolean value.

A) decrement
B) comparison
C) assignment
D) unifying
Question
Operator precedence rules ensure that addition and subtraction always take place prior to multiplication, division, or remainder in an expression.
Question
If a value is given to a variable at the time it is declared, this is called a(n) ____.

A) definition
B) allocation
C) assignment
D) initialization
Question
A ____ is a string of characters that optionally contains fixed text and contains one or more format items or placeholders for variable values.

A) namespace
B) placeholder
C) format string
D) whitespace
Question
In arithmetic operations with operands of dissimilar types, a(n) ____ is the automatic conversion of nonconforming operands to a unifying type.

A) implicit cast
B) explicit cast
C) manual cast
D) level cast
Question
You can concatenate two strings with the plus ( + ) sign.
Question
To purposefully override the unifying type in an arithmetic operation, use a(n) ____ by placing the desired result type in parentheses followed by the variable or constant to be cast.

A) implicit cast
B) automatic cast
C) intrinsic cast
D) explicit cast
Question
An escape sequence is used to represent special characters such as a carriage return or a tab, and always begins with a backslash.
Question
You use the ____ data type to hold any single character.

A) char
B) string
C) bool
D) int
Question
A ____ consists of a pair of curly braces containing a number that indicates the desired variable's position in a list that follows the string.

A) format string
B) whitespace
C) namespace
D) placeholder
Question
A prefix or postfix ____ operator reduces a variable's value by 1.

A) increment
B) sub and assign
C) add and assign
D) decrement
Question
A(n) ____ number is one that contains decimal positions.

A) integer
B) whole
C) floating-point
D) int
Question
Explain how to use the C# shortcut arithmetic operators -= , *= , and /= .
Question
How is a named constant different from a variable? How would you create a named constant (and show an example)?
Question
A data item is ____________________ when it cannot be changed after a program is compiled.
Question
Operators are used to manipulate values in a program. For example, in the expression X + Y, + is an operator. The values that operators use, such as X and Y, are called ____________________.
Question
What is a variable declaration, what is its purpose, and what does the declaration include?
Question
How can you compare strings using the Compare() method?
Question
Giving a value to a variable, as in the statement someVariable = 5 , is called a(n) ____________________.
Question
Operators that have only one argument, such as the prefix and postfix increment operators, are called ____________________ operators.
Question
What is an enumeration and what are the advantages of creating an enumeration type? Show an example of an enumeration definition.
Question
What are the differences between the prefix increment operator and postfix increment operator?
Question
As an alternative to the Convert class methods, you can use a(n) ____  method to convert a string to a number.

A) Cast()
B) Parse()
C) Assign()
D) Write()
Question
You can use the ____ method to accept user input from the keyboard.

A) Next()
B) NextLine()
C) ReadLine()
D) Input()
Question
An instruction to the user to enter data is called a ____.

A) line
B) prompt
C) cue
D) hint
Question
What are the three floating-point data types in C#? Briefly describe the characteristics of each type.
Question
The ____ method from the Convert class converts a specified value to an 8-bit unsigned integer.

A) ToDecimal()
B) ToSingle()
C) ToInt16()
D) ToByte()
Question
A program that accepts console input from the user is a(n) ____ program.

A) interactive
B) static
C) constant
D) better
Question
Explain why implicit numeric conversions are necessary and how C# chooses operands to convert.
Question
The keyword ____ is used to declare a named constant.

A) final
B) static
C) const
D) fix
Question
What are the nine integral data types in C# and how do you decide which is the most appropriate to use in a particular situation?
Question
The number of significant digits in a floating point number specifies the mathematical accuracy of the value. A(n) ____________________ data type can hold up to 16 significant digits of accuracy.
Question
Match between columns
A 16-bit coding scheme for characters
named constant
A 16-bit coding scheme for characters
culture
A 16-bit coding scheme for characters
precision specifier
A 16-bit coding scheme for characters
Unicode
A 16-bit coding scheme for characters
Boolean variable
A 16-bit coding scheme for characters
integral data type
A 16-bit coding scheme for characters
operator precedence
A 16-bit coding scheme for characters
data type
A 16-bit coding scheme for characters
comparison operator
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
named constant
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
culture
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
precision specifier
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
Unicode
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
Boolean variable
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
integral data type
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
operator precedence
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
data type
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
comparison operator
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
named constant
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
culture
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
precision specifier
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
Unicode
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
Boolean variable
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
integral data type
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
operator precedence
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
data type
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
comparison operator
Can hold only one of two values: true or false
named constant
Can hold only one of two values: true or false
culture
Can hold only one of two values: true or false
precision specifier
Can hold only one of two values: true or false
Unicode
Can hold only one of two values: true or false
Boolean variable
Can hold only one of two values: true or false
integral data type
Can hold only one of two values: true or false
operator precedence
Can hold only one of two values: true or false
data type
Can hold only one of two values: true or false
comparison operator
Rules that determine the order in which parts of a mathematical expression are evaluated
named constant
Rules that determine the order in which parts of a mathematical expression are evaluated
culture
Rules that determine the order in which parts of a mathematical expression are evaluated
precision specifier
Rules that determine the order in which parts of a mathematical expression are evaluated
Unicode
Rules that determine the order in which parts of a mathematical expression are evaluated
Boolean variable
Rules that determine the order in which parts of a mathematical expression are evaluated
integral data type
Rules that determine the order in which parts of a mathematical expression are evaluated
operator precedence
Rules that determine the order in which parts of a mathematical expression are evaluated
data type
Rules that determine the order in which parts of a mathematical expression are evaluated
comparison operator
Stores a whole number
named constant
Stores a whole number
culture
Stores a whole number
precision specifier
Stores a whole number
Unicode
Stores a whole number
Boolean variable
Stores a whole number
integral data type
Stores a whole number
operator precedence
Stores a whole number
data type
Stores a whole number
comparison operator
can compare numbers or strings and perform evaluations.
named constant
can compare numbers or strings and perform evaluations.
culture
can compare numbers or strings and perform evaluations.
precision specifier
can compare numbers or strings and perform evaluations.
Unicode
can compare numbers or strings and perform evaluations.
Boolean variable
can compare numbers or strings and perform evaluations.
integral data type
can compare numbers or strings and perform evaluations.
operator precedence
can compare numbers or strings and perform evaluations.
data type
can compare numbers or strings and perform evaluations.
comparison operator
Controls the number of significant digits or zeros to the right of a decimal point
named constant
Controls the number of significant digits or zeros to the right of a decimal point
culture
Controls the number of significant digits or zeros to the right of a decimal point
precision specifier
Controls the number of significant digits or zeros to the right of a decimal point
Unicode
Controls the number of significant digits or zeros to the right of a decimal point
Boolean variable
Controls the number of significant digits or zeros to the right of a decimal point
integral data type
Controls the number of significant digits or zeros to the right of a decimal point
operator precedence
Controls the number of significant digits or zeros to the right of a decimal point
data type
Controls the number of significant digits or zeros to the right of a decimal point
comparison operator
An identifier whose contents cannot change
named constant
An identifier whose contents cannot change
culture
An identifier whose contents cannot change
precision specifier
An identifier whose contents cannot change
Unicode
An identifier whose contents cannot change
Boolean variable
An identifier whose contents cannot change
integral data type
An identifier whose contents cannot change
operator precedence
An identifier whose contents cannot change
data type
An identifier whose contents cannot change
comparison operator
Question
What is the purpose of the ReadLine() method? How would you use it with a variable of type string ? How would you use it with a variable of type double ?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/42
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 2: Using Data
1
You declare a Boolean variable by using type ____.

A) char
B) bool
C) int
D) boolean
B
2
In the C# statement moneyString = someMoney.ToString("F3") , the expression F3 is an example of a(n) ____.

A) literal constant
B) standard numeric format string
C) named constant
D) intrinsic type
B
3
In C#, you use the ____ data type to hold a series of characters.

A) int
B) string
C) sbyte
D) char
B
4
+= is the C# ____ operator; it adds the operand on the right to the operand on the left and assigns it to the operand on the left in one step.

A) prefix increment
B) postfix increment
C) add and assign
D) increment and assign
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
5
The equal sign ( = ) is the C# assignment operator.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
6
A(n) ____ arithmetic operator has one argument to the left and another argument to the right of the operator.

A) binary
B) complex
C) composite
D) unary
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
7
A(n) ____ is a named location in computer memory that can hold different values at different points in time.

A) variable
B) constant
C) literal constant
D) alias
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
8
someValue++ is an example of the use of the prefix increment operator.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
9
An expression containing a(n) ____ operator has a Boolean value.

A) decrement
B) comparison
C) assignment
D) unifying
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
10
Operator precedence rules ensure that addition and subtraction always take place prior to multiplication, division, or remainder in an expression.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
11
If a value is given to a variable at the time it is declared, this is called a(n) ____.

A) definition
B) allocation
C) assignment
D) initialization
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
12
A ____ is a string of characters that optionally contains fixed text and contains one or more format items or placeholders for variable values.

A) namespace
B) placeholder
C) format string
D) whitespace
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
13
In arithmetic operations with operands of dissimilar types, a(n) ____ is the automatic conversion of nonconforming operands to a unifying type.

A) implicit cast
B) explicit cast
C) manual cast
D) level cast
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
14
You can concatenate two strings with the plus ( + ) sign.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
15
To purposefully override the unifying type in an arithmetic operation, use a(n) ____ by placing the desired result type in parentheses followed by the variable or constant to be cast.

A) implicit cast
B) automatic cast
C) intrinsic cast
D) explicit cast
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
16
An escape sequence is used to represent special characters such as a carriage return or a tab, and always begins with a backslash.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
17
You use the ____ data type to hold any single character.

A) char
B) string
C) bool
D) int
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
18
A ____ consists of a pair of curly braces containing a number that indicates the desired variable's position in a list that follows the string.

A) format string
B) whitespace
C) namespace
D) placeholder
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
19
A prefix or postfix ____ operator reduces a variable's value by 1.

A) increment
B) sub and assign
C) add and assign
D) decrement
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
20
A(n) ____ number is one that contains decimal positions.

A) integer
B) whole
C) floating-point
D) int
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
21
Explain how to use the C# shortcut arithmetic operators -= , *= , and /= .
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
22
How is a named constant different from a variable? How would you create a named constant (and show an example)?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
23
A data item is ____________________ when it cannot be changed after a program is compiled.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
24
Operators are used to manipulate values in a program. For example, in the expression X + Y, + is an operator. The values that operators use, such as X and Y, are called ____________________.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
25
What is a variable declaration, what is its purpose, and what does the declaration include?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
26
How can you compare strings using the Compare() method?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
27
Giving a value to a variable, as in the statement someVariable = 5 , is called a(n) ____________________.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
28
Operators that have only one argument, such as the prefix and postfix increment operators, are called ____________________ operators.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
29
What is an enumeration and what are the advantages of creating an enumeration type? Show an example of an enumeration definition.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
30
What are the differences between the prefix increment operator and postfix increment operator?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
31
As an alternative to the Convert class methods, you can use a(n) ____  method to convert a string to a number.

A) Cast()
B) Parse()
C) Assign()
D) Write()
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
32
You can use the ____ method to accept user input from the keyboard.

A) Next()
B) NextLine()
C) ReadLine()
D) Input()
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
33
An instruction to the user to enter data is called a ____.

A) line
B) prompt
C) cue
D) hint
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
34
What are the three floating-point data types in C#? Briefly describe the characteristics of each type.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
35
The ____ method from the Convert class converts a specified value to an 8-bit unsigned integer.

A) ToDecimal()
B) ToSingle()
C) ToInt16()
D) ToByte()
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
36
A program that accepts console input from the user is a(n) ____ program.

A) interactive
B) static
C) constant
D) better
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
37
Explain why implicit numeric conversions are necessary and how C# chooses operands to convert.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
38
The keyword ____ is used to declare a named constant.

A) final
B) static
C) const
D) fix
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
39
What are the nine integral data types in C# and how do you decide which is the most appropriate to use in a particular situation?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
40
The number of significant digits in a floating point number specifies the mathematical accuracy of the value. A(n) ____________________ data type can hold up to 16 significant digits of accuracy.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
41
Match between columns
A 16-bit coding scheme for characters
named constant
A 16-bit coding scheme for characters
culture
A 16-bit coding scheme for characters
precision specifier
A 16-bit coding scheme for characters
Unicode
A 16-bit coding scheme for characters
Boolean variable
A 16-bit coding scheme for characters
integral data type
A 16-bit coding scheme for characters
operator precedence
A 16-bit coding scheme for characters
data type
A 16-bit coding scheme for characters
comparison operator
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
named constant
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
culture
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
precision specifier
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
Unicode
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
Boolean variable
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
integral data type
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
operator precedence
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
data type
Describes the format and size (amount of memory occupied) of a data item and defines a set of relevant operations
comparison operator
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
named constant
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
culture
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
precision specifier
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
Unicode
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
Boolean variable
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
integral data type
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
operator precedence
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
data type
A set of rules that determines how to format values such as money and dates that can be represented differently based on locale and tradition
comparison operator
Can hold only one of two values: true or false
named constant
Can hold only one of two values: true or false
culture
Can hold only one of two values: true or false
precision specifier
Can hold only one of two values: true or false
Unicode
Can hold only one of two values: true or false
Boolean variable
Can hold only one of two values: true or false
integral data type
Can hold only one of two values: true or false
operator precedence
Can hold only one of two values: true or false
data type
Can hold only one of two values: true or false
comparison operator
Rules that determine the order in which parts of a mathematical expression are evaluated
named constant
Rules that determine the order in which parts of a mathematical expression are evaluated
culture
Rules that determine the order in which parts of a mathematical expression are evaluated
precision specifier
Rules that determine the order in which parts of a mathematical expression are evaluated
Unicode
Rules that determine the order in which parts of a mathematical expression are evaluated
Boolean variable
Rules that determine the order in which parts of a mathematical expression are evaluated
integral data type
Rules that determine the order in which parts of a mathematical expression are evaluated
operator precedence
Rules that determine the order in which parts of a mathematical expression are evaluated
data type
Rules that determine the order in which parts of a mathematical expression are evaluated
comparison operator
Stores a whole number
named constant
Stores a whole number
culture
Stores a whole number
precision specifier
Stores a whole number
Unicode
Stores a whole number
Boolean variable
Stores a whole number
integral data type
Stores a whole number
operator precedence
Stores a whole number
data type
Stores a whole number
comparison operator
can compare numbers or strings and perform evaluations.
named constant
can compare numbers or strings and perform evaluations.
culture
can compare numbers or strings and perform evaluations.
precision specifier
can compare numbers or strings and perform evaluations.
Unicode
can compare numbers or strings and perform evaluations.
Boolean variable
can compare numbers or strings and perform evaluations.
integral data type
can compare numbers or strings and perform evaluations.
operator precedence
can compare numbers or strings and perform evaluations.
data type
can compare numbers or strings and perform evaluations.
comparison operator
Controls the number of significant digits or zeros to the right of a decimal point
named constant
Controls the number of significant digits or zeros to the right of a decimal point
culture
Controls the number of significant digits or zeros to the right of a decimal point
precision specifier
Controls the number of significant digits or zeros to the right of a decimal point
Unicode
Controls the number of significant digits or zeros to the right of a decimal point
Boolean variable
Controls the number of significant digits or zeros to the right of a decimal point
integral data type
Controls the number of significant digits or zeros to the right of a decimal point
operator precedence
Controls the number of significant digits or zeros to the right of a decimal point
data type
Controls the number of significant digits or zeros to the right of a decimal point
comparison operator
An identifier whose contents cannot change
named constant
An identifier whose contents cannot change
culture
An identifier whose contents cannot change
precision specifier
An identifier whose contents cannot change
Unicode
An identifier whose contents cannot change
Boolean variable
An identifier whose contents cannot change
integral data type
An identifier whose contents cannot change
operator precedence
An identifier whose contents cannot change
data type
An identifier whose contents cannot change
comparison operator
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
42
What is the purpose of the ReadLine() method? How would you use it with a variable of type string ? How would you use it with a variable of type double ?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 42 flashcards in this deck.