What is the difference between public, private, protected
inheritance?
Answer Posted / dee
public-->inherite the protected members as preotected in
drived class and pubic members wiull be public in derived
class
protected--->pubic and protecated members of the base class
will become protected in derived class
Private-->pubilc and proteacted members will become private
in derived class
| Is This Answer Correct ? | 170 Yes | 48 No |
Post New Answer View All Answers
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.
What is a buffer c++?
What character terminates all character array strings a) b) . c) END
How many types of comments are there in c++?
Define whitespace in C++.
How can you create a virtual copy constructor?
Explain some examples of operator overloading?
How the endl and setw manipulator works?
What is the need of a destructor? Explain with the help of an example.
Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---
Why c++ is not a pure oop language?
How a pointer differs from a reference?
What is the difference between #import and #include in c++?
How does the copy constructor differ from the assignment operator (=)?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement