nataudleung9811 nataudleung9811
  • 23-07-2019
  • Computers and Technology
contestada

Class members are accessed via the ____(1)_____ operator in conjunction with the name of an object of the class, or via the ___(2)_____ operator in conjunction with a pointer to an object of the class.

Respuesta :

SaniShahbaz
SaniShahbaz SaniShahbaz
  • 27-07-2019

Answer:

1.ClassName and . operator

2. ClassName and [] operator

Explanation:

There are two ways to get the members of a class first one is by using dot(.) operator.

Example : with assumption that person is a class object and age is the member in it we can use it as:

person.age

Second way is to use [] operator with member as a string in it which is used by the compiler as key to get its value.

Example : person["age"]

Answer Link

Otras preguntas

Are gases more or less dense than liquids or solids at room temperature?
I need this fast plz What is the relationship between the genre of a work of literature and the author’s purpose? A An author has no choice about genre but un
which are examples of convection currents
HELP!!! MATH PROBABILITY QUESTIONS! 1. If three 4-sided dice were rolled, what would be the probability of getting triple 1's? Write your answer as a fraction.
What is the purpose of federalism?
are you smart spell it lol i did this to give points
Which best describes one of the actions of the Student Nonviolent Coordinating Committee? boycotting Montgomery city buses leading violent demonstrations promot
Match with the correct letters below *bass clef.(5 Points)GAGEEDGEBEAD​
Write an equation in slope intercept form for this line (4,7) slope of -3/2
What is the value of x in the equation below? 1+2eX+1 = 9 x = log4-1 X= log4 X = In4-1 X= 1n4