What is the difference between public, private, protected
inheritance?
Answer Posted / saikat
A private member can only be accessed by other methods of
the same class, while a public member can be accessed by
methods of any class or by non class code.
Is This Answer Correct ? | 9 Yes | 9 No |
Post New Answer View All Answers
What is c++ iterator?
What is diamond problem in c++?
What are all predefined data types in c++?
How would you obtain segment and offset addresses from a far address of a memory location?
How much maximum can you allocate in a single call to malloc()?
Explain the difference between using macro and inline functions?
Does c++ support multilevel and multiple inheritances?
What is the use of class in c++?
I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.
How can we access protected and private members of a class?
Can we specify variable field width in a scanf() format string? If possible how?
what are the iterator and generic algorithms.
What is the type of this pointer in c++?
What is tellg () in c++?
what is Loop function? What are different types of Loops?