Aspire Faculty ID #12638 · Topic: JECA MCA 2024 · Just now
JECA MCA 2024

The keyword friend does not appear in
(A) the class allowing access to another class.
(B) the class desiring access to another class.
(C) the private section of a class.
(D) the public section of a class.

Solution

  • The friend keyword is used inside a class definition to allow another class or function to access its private/protected members.
  • It appears in the class granting access (not the one desiring access).
  • It can be declared in either public or private section of that class.
Hence, it does not appear in the class desiring access.

Correct Answer: (B) the class desiring access to another class

Previous 10 Questions — JECA MCA 2024

Nearest first

Next 10 Questions — JECA MCA 2024

Ascending by ID
Ask Your Question or Put Your Review.

loading...