Which of the following is the syntax to declare the operator function operator[] as a member function of a class for constant arrays?

A. const Type& []operator(int index) const;
B. const Type& operator[](int index) const;
C. const Type& operator[](int index);
D. const Type [](int index) const;

Answer: B

Computer Science & Information Technology

You might also like to view...

Interviews can be time-consuming and expensive. What are your specific goals, and how would you justify a series of interviews?

What will be an ideal response?

Computer Science & Information Technology

Photorealist of the 1990s preferred subject matter that ______________.

a. contained bright colors b. contained metallic reflections c. contained subdued hues d. all of the above

Computer Science & Information Technology