1. Which of the following assigns the number of characters in the strAddress variable
to the intNum variable?
1. intNum = strAddress.Length
2. intNum = strAddress.LengthOf
3. intNum = Length(strAddress)
4. intNum = LengthOf(strAddress)
2. Which of the following statements changes the contents of the strWord variable
from “led” to “lead”?
1. strWord = strWord.AddTo(2, "a")
2. strWord = strWord.Insert(2, "a")
3. strWord = strWord.Insert(3, "a")
4. strWord = strWord.Into(3, "a"c)
3. The strAmount variable contains the string “678.95”. Which of the following
statements changes the contents of the variable to the string “678.95!!!”?
1. strAmount = strAmount.PadRight(9, "!")
2. strAmount = strAmount.PadRight(9, "!"c)
3. strAmount = strAmount.PadRight(3, "!"c)
4. strAmount = strAmount.PadRight(3, "!")
4. Which of the following statements can be used to determine whether
the strRate variable contains the percent sign?
1. blnResult = strRate.Contain("%")
2. intResult = strRate.Index("%")
3. intResult = strRate.GetIndex("%")
4. intResult = strRate.IndexOf("%")
, 5. If the strPresident variable contains the string “Abraham Lincoln”, what value will
the strPresident.IndexOf ("ham") method return?
1. True
2. –1
3. 4
4. 5
6. If the strName variable contains the string “Sharon Kelper”, which of the following
statements changes the contents of the variable to the string “Sharon P. Kelper”?
1. strName = strName.Insert(6, " P.")
2. strName = strName.Insert(7, " P.")
3. strName = strName.Insert(8, "P. ")
4. strName = strName.Insert("P. ", 7)
7. If the strMsg variable contains the string “Her birthday is Friday!”, which of the
following statements assigns the number 16 to the intNum variable?
1. intNum = strMsg.Substring(0, "F")
2. intNum = strMsg.Contains("F")
3. intNum = strMsg.IndexOf("F")
4. intNum = strMsg.IndexOf(0, "F")
8. If the strAddress variable contains the string “41 Main Street”, what will
the strAddress.IndexOf("Main") method return?
1. –1
2. 3
3. 4
4. True
to the intNum variable?
1. intNum = strAddress.Length
2. intNum = strAddress.LengthOf
3. intNum = Length(strAddress)
4. intNum = LengthOf(strAddress)
2. Which of the following statements changes the contents of the strWord variable
from “led” to “lead”?
1. strWord = strWord.AddTo(2, "a")
2. strWord = strWord.Insert(2, "a")
3. strWord = strWord.Insert(3, "a")
4. strWord = strWord.Into(3, "a"c)
3. The strAmount variable contains the string “678.95”. Which of the following
statements changes the contents of the variable to the string “678.95!!!”?
1. strAmount = strAmount.PadRight(9, "!")
2. strAmount = strAmount.PadRight(9, "!"c)
3. strAmount = strAmount.PadRight(3, "!"c)
4. strAmount = strAmount.PadRight(3, "!")
4. Which of the following statements can be used to determine whether
the strRate variable contains the percent sign?
1. blnResult = strRate.Contain("%")
2. intResult = strRate.Index("%")
3. intResult = strRate.GetIndex("%")
4. intResult = strRate.IndexOf("%")
, 5. If the strPresident variable contains the string “Abraham Lincoln”, what value will
the strPresident.IndexOf ("ham") method return?
1. True
2. –1
3. 4
4. 5
6. If the strName variable contains the string “Sharon Kelper”, which of the following
statements changes the contents of the variable to the string “Sharon P. Kelper”?
1. strName = strName.Insert(6, " P.")
2. strName = strName.Insert(7, " P.")
3. strName = strName.Insert(8, "P. ")
4. strName = strName.Insert("P. ", 7)
7. If the strMsg variable contains the string “Her birthday is Friday!”, which of the
following statements assigns the number 16 to the intNum variable?
1. intNum = strMsg.Substring(0, "F")
2. intNum = strMsg.Contains("F")
3. intNum = strMsg.IndexOf("F")
4. intNum = strMsg.IndexOf(0, "F")
8. If the strAddress variable contains the string “41 Main Street”, what will
the strAddress.IndexOf("Main") method return?
1. –1
2. 3
3. 4
4. True