VB Quiz - Section 3.2 - Strings correctly answered rated A+ 2024/2025
VB Quiz - Section 3.2 - StringsWhich of the following statements is a valid assignment statement? - correct answer (A) txtBox = "Hello World" (B) "Hello World" = txtBox.Text (C) txtBox.Text = "Hello World" (D) TBox = "Hello World" C What is the correct syntax for displaying the value of the String variable myString in a text box? - correct answer (A) txtBox.Text = "myString" (B) txtBox.Text = myString (C) txtBox.TString (D) txtBox.Text = Str(myString) B Which of the following code statements generates an error? - correct answer (A) txtFirst.Text = "Hello" (B) txtFirst.Text = Hello (C) txtFirst.Text = "My Text" (D) txtFirst.Text = Me.Text B Which of the following statements will NOT display the number 5 in the text box? - correct answer (A) txtBox.Text = 5 (B) txtBox.Text = "5" (C) txtBox.Text = CStr("5") (D) txtBox.Text = CStr(5) A Which function converts a number to its string representation? - correct answer (A) CStr (B) convertToString (C) Str (D) sConvert A Which statement will display the words "Hello World" in a text box? - correct answer (A) txtBox.Text = Hello & World (B) txtBox.Text = "Hello " & World (C) txtBox.Text = Hello & " World" (D) txtBox.Text = "Hello" & " World" D Which of the following expressions has as its value the value of strVar with its leading and trailing spaces removed? - correct answer (A) strVar.Length (B) strVar.ToUpper (C) strVar.Ctrim (D) strVar.Trim D Which statement can be used to clear the contents of a text box? - correct answer (A) txtBox.Empty = True (B) txtBox = "" (C) txtBox.Text = "" (D) txtBox.Wipe() C What character is used to signify the beginning of a comment statement? - correct answer (A) asterisk (B) exclamation mark (C) apostrophe
Written for
- Institution
- Cstr
- Course
- Cstr
Document information
- Uploaded on
- February 23, 2024
- Number of pages
- 8
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
vb quiz section 32 strings