Which of the following statements assigns the string “London” to the strCity member of the Country variable ?a. england.strCity = "London"b. Country.strCity = "London"c. Country.england.strCity = "London"d. strCity.england = "London"

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter7: String Manipulation
Section: Chapter Questions
Problem 10RQ
icon
Related questions
Question

Which of the following statements assigns the string “London” to the strCity member of the Country variable ?
a. england.strCity = "London"
b. Country.strCity = "London"
c. Country.england.strCity = "London"
d. strCity.england = "London"

Expert Solution
Step 1

ASSIGNMENT IN A VARIABLE:

  • To assign a string in a variable, the string must be enclosed in double quotes.
  • To access a particular member of a variable '.' operator is used.
    • If variable name is X and we want to access its member Y, then we write as X.Y
  • To assign a variable with any value, assignment operator ( = ) is used.
  • Variable name and the member of the variable is written on the left hand side and the value which is to be assigned to that member is written on the right hand side.
  • Syntax:
    • Variable_name.Member_name = " string_value"
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,