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 3RQ
Program Description Answer
The statement strAmount = strAmount.PadRight(9, “!”c) changes the contents of the strAmount variable from “678.95” to “678.95!!!”.
Hence, the correct answer is option “B”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
If the strWord variable contains the string “spring”, which of the following statements assigns the letter r to the strLetter variable? a. strLetter = strWord.Substring(2) b. strLetter = strWord(2) c. strLetter = strWord(2, 1) d. All of the above.
You have been hired by PetPals Veterinary Clinic to modify its Bill Calculator application. Upon reviewing the application, you notice that all of the controls have their default names. You also notice that the Calculate button’s code uses the properties of controls in the calculation statements.
The total amount a customer owes for all of the services performed during an office visit may contain a decimal place. What data type is best for a variable that will store this value?
a.
String
b.
Double
c.
Integer
d.
Fraction
If the strWord variable contains the string “crispy”, which of the following statements assigns the letter s to the strLetter variable? a. strLetter = strWord.Substring(3) b. strLetter = strWord.Substring(3, 1) c. strLetter = strWord.Substring(4, 1) d. None of the above.
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
- Assume that the following variables contain the values shown:numberBig = 100numberMedium = 10numberSmall = 1wordBig = "Constitution"wordMedium = "Dance"wordSmall = "Toy”For each of the following Boolean expressions, decide whether the statement is true, false, or illegal.a. numberBig > numberSmallb. numberBig < numberMediumc. numberMedium = numberSmalld. numberBig = wordBige. numberBig = "Big"f. wordMedium > wordSmallg. wordSmall = "TOY"h. numberBig <= 5 * numberMedium + 50i. numberBig >= 2000j. numberBig > numberMedium + numberSmallk. numberBig > numberMedium AND numberBig < numberSmalll. numberBig = 100 OR numberBig > numberSmallm. numberBig < 10 OR numberSmall > 10n. numberBig = 300 AND numberMedium = 10 OR numberSmall = 1o. wordSmall > wordBigp. wordSmall > wordMediumarrow_forwardThe strName variable contains the string “Jeffers”. Which of the following statements changes the contents of the variable to the string “Jeff”? a. strName = strName.Remove(4) b. strName = strName.Remove(5) c. strName = strName.Remove(5, 3) d. strName = strName.Remove(3, 5)arrow_forwardDefine two variables, one for storing a string store first name "Chuck" and one for the last name “Brank". Then combine these two strings together into another variable named $fyllname, with a blank space in between. (PHP Language)arrow_forward
- 16. Which statement will add leading zeroes to x? string x + = "0" string x = "0" + x either of the option none of the optionsarrow_forwardThe strAmount variable contains the string “678.95”. Which of the following statementschanges the contents of the variable to the string “678.95!!!”?a. strAmount = strAmount.PadRight(9, "!")b. strAmount = strAmount.PadRight(9, "!"c)c. strAmount = strAmount.PadRight(3, "!"c)d. None of the above.arrow_forwardWhich of the following string methods is a mutator? A) .join B) .lower C) .replace D) All of the above E) None of the abovearrow_forward
- The strDue variable contains the string “$****75”. Which of the following statements removes the dollar sign and asterisks from the variable? a. strDue = strDue.Trim("$"c, "*"c) b. strDue = strDue.TrimStart("*"c, "$"c) c. strDue = strDue.TrimStart("$"c, "*"c) d. All of the above.arrow_forwardA procedure is passed a copy of the value stored in a Decimal variable, followed by a copy of the value stored in a String variable. Which of the following is a valid header for the procedure?a. Private Sub Display(ByRef decX As Decimal, ByRef strY As String)b. Private Sub Display(ByValue decX As Decimal, ByValue strY As String)c. Private Sub Display(ByVal decX As Decimal, ByVal strY As String)d. Private Sub Display(ByCopy decX As Decimal, ByCopy strY As String)arrow_forwardWhich of the following expressions evaluates to True when the strItem variable contains the string “1234Y5”? a. strItem Like "####[A-Z]#" b. strItem Like "9999[A-Z]9" c. strItem Like "######" d. None of the above.arrow_forward
- (this question is part 2 of 3 in a long problem) JavaScript Commands Create the nameSearch variable equal to the value entered in the nameSearch input box. Users can search for names in three ways: Matching an employee's last name if it contains the text string specified in nameSearch Matching an employee's last name if it begins with the nameSearch text string Matching an employee's last name only if it exactly matches the nameSearch text string. Richard has supplied you with code to add the selectedValue() method to the prototype of the HTMLSelectElement object class in order to return the value of the selected option in any selection list. Apply the selectedValue() method to the nameSearchType selection list to return the option selected by the user, storing the value in the nameSearchType variable. Create a switch-case structure for the following possible values of the nameSearchType variable: If nameSearchType equals "contains", use the new RegExp() constructor to create a…arrow_forwardNonearrow_forwardIf the decPay variable contains the number 1200.76, which of the following statements displays the number as 1,200.76? a. lblPay.Text = decPay.ToString("N2") b. lblPay.Text = decPay.ToString("F2") c. lblPay.Text = decPay.ToString("D2") d. lblPay.Text = decPay.ToString("C2")arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning