in Object Oriented Programming edited by
4,618 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
in Object Oriented Programming edited by
4.6k views

2 Answers

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

1 comment

in syllabus?
0
0
1 vote
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)
 

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