Section 1

Preview this deck

Which is the expression that means "a is equal to b or a is equal to c?" in C#? A. a = b OR a = c B. a==b || a==c C. a = b || a = c D. a eq b OR a eq c

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

7 years ago

Date created

Mar 1, 2020

Cards (9)

Section 1

(9 cards)

Which is the expression that means "a is equal to b or a is equal to c?" in C#? A. a = b OR a = c B. a==b || a==c C. a = b || a = c D. a eq b OR a eq c

Front

B. a==b || a==c

Back

When you create a class, you usually declare instance variables to be ________ and instance methods to be _________

Front

Private, public

Back

When the program is running, it can use the class to create as many objects of a specific type as needed. Each object that is created from a class is also called a (n) _______ of the class.

Front

instance

Back

A (n) _______ is a method that is automatically executed when an object is created.

Front

constructor

Back

The result of the following is __. int temp = 15; if (!(temp > 15)) { MessageBox.Show("cold"); } else { MessageBox.Show("hot"); } A. cold B. hot C. nothing D. error message

Front

A. cold

Back

The result of the following is __. int grade = 72; if (grade >=80) { MessageBox.Show("A"); } else if (grade >=70) { MessageBox.Show("B"); } else if (grade >=60) { MessageBox.Show("C"); } else if (grade >=50) { MessageBox.Show("D"); } else { MessageBox.Show("F"); } A. A B. B C. C D. D

Front

else if (grade >=70) { MessageBox.Show("B"); }

Back

Which is an example of List in C#? A. CellPhone[] phones = new CellPhone[4]; B. CellPhone[] phones = { new CellPhone(), new CellPhone() }; C. List<CellPhone> phoneList = new List<CellPhone>(); D. List<CellPhone> phoneList = { new CellPhone(), new CellPhone() };

Front

List<CellPhone>phoneList = new List<CellPhone>();

Back

How many times will the following loop iterate? int i = 0; do { MessageBox.Show(i.ToString()); i++; } while (i < 5); A. 3 B. 4 C. 5 D. 6

Front

C. 5

Back

According to the following code segment, __. if (temp < 30 || temp > 90) { MessageBox.Show("Error"); } A. The MessageBox.Show statement executes only if temp is less than 30. B. The MessageBox.Show statement executes only if temp is greater than 90. C. The MessageBox.Show statement executes if temp set to 0. D. The MessageBox.Show statement executes if temp set to 50.

Front

C. The MessageBox.Show statement executes if temp set to 0.

Back