Saved Bookmarks
| 1. |
Which is the correct syntax for declaring the type of this in a member function?(a) classType [cv-qualifier-list] *const this;(b) classType const[cv-qualifier-list] *this;(c) [cv-qualifier-list]*const classType this;(d) [cv-qualifier-list] classType *const this;The question was asked by my school principal while I was bunking the class.This is a very interesting question from This Pointer topic in chapter Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming |
|
Answer» Right choice is (d) [cv-qualifier-list] classType *const this; |
|