What do you mean by public, private, protected and friendly?
Answer Posted / achal ubbott
public means access to the object of the class, created in
outside world.
private and protected are almost the same, except the
difference that protected members are inheritable and thus
can be used by derived class. These can be accessed only by
the public function members of the class.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How long to learn object oriented programming?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
Why is there no multiple inheritance?
What is difference between class and object with example?
What is class and example?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
What are the 4 pillars of oop?
Can bst contain duplicates?
to find out the minimum of two integer number of two different classes using friend function
What is destructor give example?
What is byval and byref? What are differences between them?
How to call a non virtual function in the derived class by using base class pointer
What are two types of polymorphism?
What is the real time example of encapsulation?
Why is polymorphism needed?