Exam 3: Variables, Input, and Output

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

When declaring a variable of type String, you must specify a length for the string.

(True/False)
4.7/5
(43)

The following lines are valid. Dim h As String = "Hello" txtBox.Text = CStr(h.IndexOf("h"))

(True/False)
4.8/5
(41)

What will be the output of the following statement? txtBox.Text = (2/3).ToString("P4")

(Multiple Choice)
4.8/5
(39)

What value will be assigned to the numeric variable x when the following statement is executed? x = 2 + 3 * 4

(Multiple Choice)
4.9/5
(38)

If TAX_RATE is a named constant of type Double, which of the following statements is valid?

(Multiple Choice)
4.9/5
(36)

The value assigned to a class-level named constant can be changed in any procedure.

(True/False)
4.9/5
(36)

What will be the output of the following statement? txtBox.Text = CStr(Math.Round(17 / 2))

(Multiple Choice)
4.9/5
(32)

If strVar.Length is 5, then the value of strVar.Substring(4, 1) is the last character of the value of strVar.

(True/False)
4.8/5
(36)

A numeric variable that has not been assigned a value has the default value zero.

(True/False)
4.8/5
(32)

What message will be displayed by the following statement: MessageBox.Show("This is a test.", "Test")

(Multiple Choice)
4.8/5
(41)

Which of the following statements removes all text from lstBox?

(Multiple Choice)
4.9/5
(37)

What will be the output of the following lines? Dim alphabet, soup As string alphabet - "abcdefghijklmnopqrstuvwxyz" soup = alphabet. ToUpper txtBox.Text - alphabet.Substring (0,5)&( 0,5 ) \& soup. Sabstring (0,5)( 0,5 )

(Multiple Choice)
4.9/5
(34)

Assume that x, y, and temp are Integer variables. Which of the following lines of code swaps the values of x and y?

(Multiple Choice)
4.8/5
(39)

The Trim method is used to remove all blank space before and after a string.

(True/False)
5.0/5
(31)

What will be the output of the following statement? txtBox.Text = (1234.56789).ToString("N3")

(Multiple Choice)
4.9/5
(42)

When the Mask property of a masked text box is set to LL, at most two characters (consisting of letters or spaces) can be entered into the masked text box.

(True/False)
4.9/5
(36)

What will be the output of the following line? txtBox.Text = "2" & 3

(Multiple Choice)
4.8/5
(40)

After the statement txtBox.Text = "" is executed, the text box will be clear and the cursor will appear inside the text box.

(True/False)
4.9/5
(33)

A string literal is a sequence of characters that is treated as a single entity.

(True/False)
4.8/5
(33)

Which of the following expressions will yield the string "John Doe", where name1 = "John Blake" and name2 = "Janet Doe"?

(Multiple Choice)
4.9/5
(42)
Showing 81 - 100 of 101
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)