The Gateway to Computer Science Excellence
+4 votes
505 views

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
in Object Oriented Programming by Boss (16.3k points)
edited by | 505 views

2 Answers

+8 votes
Best answer
(A) is the answer. All are straight from definitions.
by Veteran (431k points)
selected by
+1 vote

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)
 

by Active (2.5k points)
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,291 answers
198,209 comments
104,890 users