edited by
4,614 views
6 votes
6 votes

Match the following concepts and their best possible descriptions.

  Concept   Description
i. overloading a. allows to define a class to have properties of another class
ii. friend b. defining a set of similar functions
iii. constructor c. used in dereferencing
iv. protected d. used to give a non-member function access to the private parts of an object
v. this e. a function which is automatically called when an object is created
vi. inheritance f. allows a derived class to have access to the private parts of the base class
    g. a pointer to the object associated with the current function
    h. used to obtain object persistence
  1. i-b, ii-d, iii-e, iv-f, v-g, vi-a
  2. i-c, ii-a, iii-e, iv-d, v-h, vi-f
  3. i-c, ii-f, iii-h, iv-a, v-g, vi-d
  4. i-b, ii-e, iii-c, iv-f, v-g, vi-s
edited by

2 Answers

Best answer
8 votes
8 votes
(A) is the answer. All are straight from definitions.
selected by
1 votes
1 votes

ii.Friends are functions or classes declared with the friend keyword.
A non-member function can access the private and protected members of a class if it is declared a friend of that class. That is done by including a declaration of this external function within the class, and preceding it with the keyword friend : (d)

v. ‘this’ is a reference variable that refers to the current object. : (g)

Suitable option : (A)
 

Answer:

Related questions

2 votes
2 votes
1 answer
1
go_editor asked Jul 7, 2016
1,237 views
Match the following with respect to java.util.$\ast$ class methods :$\begin{array}{clcl} \text{(a)} & \text{Bit Set} & \text{(i)} & \text{Time zone getTimezone()} \\ \t...
1 votes
1 votes
1 answer
4
makhdoom ghaya asked Jul 4, 2016
1,792 views
Match the following with respect to I/O classes in object oriented programming $:$$\begin{array}{clcl} & \textbf{List – I}&& \textbf{List – II} \\ \text{a.} & \text{...