Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
Expert Solution & Answer
Book Icon
Chapter 7, Problem 6RQ
Program Description Answer

The statement “strName = strName.Insert(6, “P.”)” changes the contents of the strName variable that contains the string “Sharon Kelper” to “Sharon P. Kelper”.

Hence, the correct answer is option “A”.

Blurred answer
Students have asked these similar questions
If the strName variable contains the string “Sharon Kelper”, which of the following changes the contents of the variable to the string “Sharon P. Kelper”? a. strName = strName.Insert(6, " P.") b. strName = strName.Insert(7, " P.") c. strName = strName.Insert(8, "P. ") d. None of the above.
If the strMessage variable contains the string “Today is Sunday”, which of the following assigns the number 10 to the intNum variable?a. intNum = strMessage.Substring("u")b. intNum = strMessage.Substring("S", 1)c. intNum = strMessage.IndexOf("u")d. intNum = strMessage.IndexOf(0, "S")
If the strName variable contains the string “Tony Harris”, which of the following changes the contents of the variable to “Tony J. Harris”?a. strName = strName.Insert(" ", " J. ")b. strName = strName.Insert(5, "J. ")c. strName = strName.Insert(4, " J.")d. both b and c
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning