Non-static function members of a class gain access to the calling object’s members by

a) pointer to the calling object that is implicitly provided by the compiler. The name of this pointer is this. Members are prefixed implicitly by this->, as in
this->membername
b) a variable called self that is an alias for the calling object. This self is used to access the members of the object.
c) There is no particular mechanism, the variables just know what the calling object is and automatically refer to the calling object.
d) None of the above.


a) pointer to the calling object that is implicitly provided by the compiler. The name of this pointer is this. Members are prefixed implicitly by this->, as in
this->membername

The “this” pointer is implicitly passed to every constructor, destructor and all other non-static member function. this-> is an automatic prefix that is applied to every member of the class in the definition of function members.

Computer Science & Information Technology

You might also like to view...

Categorize each of the following usability specifications as a performance measure or a preference measure. Justify your answers.

a. Users should be able to login in within 3 minutes, even if they forget their passwords. b. On a scale of 1 to 5 where 1 is “very difficult” and 5 is “very easy”, ninety percent of the users should rate the login process a 4 or above c. Users should hit the “back” button no more than 2 times when looking for merchandise items. d. Over 95 percent of our current users will prefer the redesigned site to the current site. e. Users should be able to find the “check out” page in one click no matter where they are in the site. f. If they have shopped online previously, users should be satisfied with the security of our site’s online transaction system.

Computer Science & Information Technology

Answer the following statements true (T) or false (F)

1) The principal operation of memory management is to bring processes into main memory for execution by the processor. 2) A physical address is the location of a word relative to the beginning of the program and the processor translates that into a logical address. 3) The best-fit algorithm is usually the worst performer. 4) All segments of all programs must be of the same length. 5) Segmentation does not eliminate internal fragmentation.

Computer Science & Information Technology

What is the output from the following?

``` >>> first = "Abe" >>> last = "Lincoln" >>> print first + last ```

Computer Science & Information Technology

The two simplest forms of the ____ are the plain e-mail address and the recipient's name followed by the e-mail address in angle brackets.

A. Address Form B. Internet Message Format C. Address Specifier D. Message Format

Computer Science & Information Technology