112k views
3 votes
Assume that myCar is an instance of the Car class and that the Car class has a member function named accelerate. Which of the following is a valid call to the accelerate member function?

(A) myCar:accelerate )
(B) myCar.accelerate
(C) myCar::accelerate )
(D) Car->accelerate)

1 Answer

1 vote

Answer:

C

Step-by-step explanation:

myCar::accelerate()

here :: operator is used to access the member function outside the class.

we are calling accelerate() function using class and ::

User Ramz
by
6.9k points