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 ejected from the nucleus during alpha decay?
what was jefferson main reason for purchasing the louisiana territory from France?
Which sentence uses the correct superlative form of calm? A. Dogs act calmer than puppies. B. Who will be the calmest person in an emergency? C. Our te
the skin is moistened and softened by oil made in
So was the last comment the question ?
8. Understanding Cause and Effect According to Mann, what is the greatest cause of equality among men?
What theme or event in The Metamorphosis can be better understood by learning a bit about Kafka's own life?
What is the concern with rainfall in the southern Aegean?
which composer was known for improvisation
What is the value of this expression (4.08)(0.7)?