Log in
Sign up for FREE
arrow_back
Library

C# Chapter 2 Review cloned 10/28/2019

star
star
star
star
star
Last updated over 6 years ago
19 questions
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Question 1
1.

1. A variable declaration must contain all of the following except a(n) ______________.

Question 2
2.

Which of the following is true of variable declarations?

Question 3
3.

Assume that you have two variables declared as int var1 = 3; and int var2 = 8;. Which of the following would display 838?

Question 4
4.

Assume that you have a variable declared as int var1 = 3;. Which of the following would display X 3X?

Question 5
5.

Assume that you have a variable declared as int varl = 3;. What is the value of 22 % var1?

Question 6
6.

Assume that you have a variable declared as int var1 = 3;. What is the value of 22 / var1?

Question 7
7.

What is the value of the expression 4 + 2 * 3?

Question 8
8.

Assume that you have a variable declared as int var1 = 3;. If var2 = ++var1, what is the value of var2?

Question 9
9.

Assume that you have a variable declared as int var1 = 3;. If var2 = var1++, what is the value of var2?

Question 10
10.

A variable that can hold the two values true and false is of type ______________.

Question 11
11.

Which of the following is not a C# comparison operator?

Question 12
12.

What is the value of the expression 6 >= 7?

Question 13
13.

Which of the following C# types cannot contain floating-point numbers?

Question 14
14.

Assume that you have declared a variable as double hourly = 13.00;. What will the statement WriteLine(hourly); display?

Question 15
15.

Assume that you have declared a variable as double salary = 45000.00;. Which of the following will display $45,000?

Question 16
16.

When you perform arithmetic operations with operands of different types, such as adding an int and a float____________________ .

Question 17
17.

Unicode is_____________________.

Question 18
18.

Which of the following declares a variable that can hold the word computer?

Question 19
19.

Which of the following compares two string variables named string1 and string2 to determine if their contents are equal?