Computer Science · Object Oriented Programming
Given below are two statements regarding C++ programming language: Statement (I): A friend function and the member functions of a friend class can directly access the private and protected data of the class granting friendship. Statement (II): A friend function can access the private data of a derived class through the member functions of its base class. In the light of the above statements, choose the most appropriate answer from the options given below:
- 1Both Statement I and Statement II are correct
- 2Both Statement I and Statement II are incorrect
- 3Statement I is correct but Statement II is incorrect✓
- 4Statement I is incorrect but Statement II is correct
Correct answer
Statement I is correct but Statement II is incorrect
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Object Oriented Programming?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Object Oriented Programming