1a)which of the following is the syntax to overload the function operator{}as a
ID: 3627757 • Letter: 1
Question
1a)which of the following is the syntax to overload the function operator{}as a memmember function of a class of constant arrays
a)constant Type& [] operator(int index) const;
b)constant Type& operator[](int index) const;
c)constant Type& operator[](int index);
d)constant Type[] (int index) const;
2b)which of the following is the syntax to overload the function operator{}as a memmember function of a class of nonconstant arrays
a)Type& [] operator(int index);
b)Type operator[](int index);
c)Type& operator[](int index);
d)Type[] (int index);
Explanation / Answer
b)constant Type& operator[](int index) const;
b)Type& operator[](int index);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.