C++ Programming - Objects and Classes - Discussion
Discussion Forum : Objects and Classes - General Questions (Q.No. 6)
6.
Which of the following statements is correct when a class is inherited publicly?
Discussion:
2 comments Page 1 of 1.
Iram said:
1 decade ago
Public keyword means data for all, to access data anywhere in the program, so when base class is inherited publicly by the derived class, all public data of base class will be access by derived class.
Gursewak said:
1 decade ago
This is a fact in object oriented programming that we use PUBLIC keyword only and only if we want to access any data anywhere in a program inside any class or outside the class.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers