Question: Question 1 What is a variable? A. A value that changes over time B. A memory location with a unique name and a data type
Question 1 What is a variable?
A. A value that changes over time
B. A memory location with a unique name and a data type
C. A random value
D. A location for storing only whole numbers.
Question 2 Which data type could be used to store a user's initials?
A. int
B. double
C. string
D. bool
Question 3 Which data type would be used to store 99.9?
A. int
B. double
C. char
D. string
Question 4 Which part of the following statement is the variable identifier?
string firstName = "Madison";
A. firstName
B. string
C. "Madison"
D. string firstName
Question 5 Which of the following could be used to store a value of 15,000?
Select ALL that apply.
A. int
B. double
C. float
D. char
E. short
F. string
G. ulong
Question 6 The following statement is a valid variable declaration and initialization:
double var1 = "101.45";
A. True
B. False
Question 7 How would the following expression evaluate in C#? Consider both order of operations and data types.
25 / 2 + 4 * 2.5
Select the most correct answer.
A. 22.0
B. 22
C. 22.5
D. 41.25
Question 8 How would the following expression evaluate in C#? Consider both order of operations and data types.
4 - 9 % 6
Select the most correct answer.
A. -1
B. 3
C. 0
D. 1
Question 9 Suppose you needed a variable to store the radius of a circle with up to 5 decimal digits of precision. An appropriate data type to use in this situation would be Blank 1.
Fill in the blank: ________________________________
Question 10
Complete each variable declaration by matching it to an appropriate literal value.
init var1 1.618
double var2 "Hello!"
char var3 42
string var4 10.1m
decimal var5 'K'
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
