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

what is x + 9≤10 as an inequalite ?
Find the vertex F(x)=5x²-10x+3
The radius of the earth's orbit is 45,000,000 meters. What is the number in scientific notation?
What two areas benefited most from Morse's invention of the telegraph and the speed it brought to communication?
5. About what percentage of the Indian population lives in the lower and middle Ganges river basin? A. 70% B. 50% C. 60% D. 40%
9. Using what you have learned in this exercise, write a paragraph applying the concepts. Describe a cell which effectively uses diffusion as a means to move ma
Which of the following is TRUE about Supreme Court justices? A. They are the country’s foremost authorities on state constitutions. B. Justices throw cases away
Why did railroads have a greater impact on American society than did canals and steamboats?
what process takes place inside chloroplasts
What did the Thirteenth Amendment do?