Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
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”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents 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
Chapter 7 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 7 - Which of the following statements changes the...Ch. 7 - Prob. 3RQCh. 7 - Prob. 6RQCh. 7 - Prob. 7RQCh. 7 - Prob. 11RQCh. 7 - Prob. 12RQCh. 7 - Prob. 14RQCh. 7 - Which of the following expressions evaluates to...Ch. 7 - Which of the following statements declares an...Ch. 7 - Which of the following statements generates a...
Knowledge Booster
Similar questions
- Which of the following statements removes any leading and trailing spaces from the strCity variable? a. strCity = Trim(strCity) b. strCity = strCity.Trimc. strCity = strCity.Text.Trim d. none of the abovearrow_forwardThe strCity and strState variables contain the strings “Darien” and “IL”, respectively. Which of the following assigns the string “Darien, IL” (the city, a comma, a space, and the state) to the lblAddress control’s Text property?a. lblAddress.Text = "strCity" & ", " & "strState"b. lblAddress.Text = strCity $ ", " $ strStatec. lblAddress.Text = strCity & ", " & strStated. lblAddress.Text = "strCity, " & "strState"arrow_forwardWhich of the following data types is appropriate for a variable that will storealphanumeric text? a. Alpha b. AlphaNum c. String d. Textarrow_forward
- If the intNum variable contains the number 5, which of the following assigns the number 125 to the intCubed variable? a. intCubed = intNum ^ 3b. intCubed = intNum * intNum * intNum c. intCubed = intNum * intNum ^ 2d. all of the abovearrow_forwardWhich JavaScript expression can you use to retrieve the value from the web form input control with the id “numberOfParticipants”? a. getInputValue("numberOfParticipants") b. let value = document.getElementById("numberOfParticipants") c. document.getElementById("numberOfParticipants").input d. document.getElementById("numberOfParticipants").valuearrow_forwardWhich of the following returns the Boolean value True when thestrPetName variable contains the string “Micki”? strPetName.Contains ("k") strPetName Like "M*" strPetName. Substring (2, 1) = "c" all of the abovearrow_forward
- If the following JavaScript commands were used to construct and place the niftyDivelement, then removing this element may be accomplished by using the statement document.deleteChild(niftyDiv);.let niftyDiv = document.createElement("div"); document.body.appendChild(niftyDiv); Choose between True or False: True Falsearrow_forwardWhich of the following assigns the highest column subscript in the array to the intHighCol variable?a. intHighCol = decSales.GetHighest(1)b. intHighCol = decSales.GetHighSub(1)c. intHighCol = decSales.GetUpperBound(1)d. intHighCol = decSales.GetUpperBound(0)arrow_forwardThe __________ property allows you to set the font, font style, and size of the control’s text.a. Styleb. AutoSizec. Textd. Fontarrow_forward
- Please create using C# The sales tax rate is 5.5%. Rename all text boxes, using a 2 after their names as in:txtNumScoops2, txtUnitPrice2, btnCalculate2, etc.10. Delete the Discount Code label and the Discount Code text box11. Add a group box from your toolbox, change the text property to be Discount Code12. Click on the group box, and then click the radio button object in the toolbox13. Change the text property for the radio button to Discount 20%, rename (ID property)to radDiscount2014. Copy the radio button two more times15. Rename them to be radDiscount10 and radDiscount0 and change the text properties tobe Discount 10%, Discount 0%/16. Do the same calculations as the top objects, however modify your code to use theradio button to determine which discount option to implementa. The code to check if a radio button has been selected would be:if (radDiscount20.Checked) //this implies the first button has been selected17. To clear a radio button the code would be:radDiscount20.Checked =…arrow_forward1. Create a variable called NUMBER and assign the value 9 to it 2. Create an IF statement that will print out “the number is greater than 5” IF the NUMBERis greater than 5 3. Create an ELSE statement that will print out “the number is less than 5” if the number isless than 5 4. Test the code to make sure it works. Make sure to test a number greater than 8 andless than 8 5. Copy the code into the submission box or attach the code file to your submissionarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningNew Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning