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

May i have assistance for: 3.2÷ 5.68?
uruguay and argentina’s are two of the A - most democratic countries of south america B - wealthiest countries of south america C - most mountainous countries o
the morning shift at the point grocery store is 6.5 hours long if the cashiers make 10.25 per hour how much do they make each shift
cause an effectplease help asap
What invention helped to contribute to the start of the Civil War and how did it help contribute to the start of the Civil War?
what would be 5/10 simplified
the patriot what does Martin feel about independence
Which event led to the formation of our solar system? A galaxy broke apart. A massive star exploded. A solar nebula collapsed. Dark matter materialized.
the graph shows the number of laps Kailee ran around a track over a given number of minutes. please help me someone
The main building of the United Nations is located in