In C++, if a function f is defined as a friend function, then which of the…

PYQ DSSSB 2018

In C++, if a function f is defined as a friend function, then which of the following category of data members can be accessed using the function f ?

  1. A.

    Only Private

  2. B.

    Only Protected

  3. C.

    Only Public

  4. D.

    Public, Private and Protected

Attempted by 1463 students.

Sign up free to check your answer

Sign up free

Explore the full course: Dsssb Tgt Computer Science Paper 2

Loading lesson…