Solved

Which of the Following Is the Syntax to Overload the Operator

Question 32

Multiple Choice
Which of the following is the syntax to overload 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;

Which of the following is the syntax to overload 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;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents