What is the difference between public, private, protected
inheritance?
Answer Posted / krishnakumar
Modifier | Class | Package | Subclass | World
public | Y | Y | Y | Y
protected | Y | Y | Y | N
no modifier | Y | Y | N | N
private | Y | N | N | N
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
Why do we use pointers in c++?
Should I learn c++ c?
Are c and c++ similar?
How is data hiding achieved in c++?
Which bit wise operator is suitable for putting on a particular bit in a number?
Why is c++ is better than c?
Explain deep copy and a shallow copy?
Is c++ a high level language?
how can i access a direct (absolute, not the offset) memory
address?
here is what i tried:
wrote a program that ask's for an address from the user,
creates a FAR pointer to that adress and shows it. then the
user can increment/decrement the value in that address by
pressing p(inc+) and m(dec-).
NOW, i compiled that program and opened it twice (in 2
different windows) and gave twice the same address to it.
now look what happen - if i change the value in
one "window" of the program, it DOES NOT change in the
other! even if they point to the same address in the memory!
here is the code snippet:
//------------------------------------------------------
#include Is std :: string immutable? What is the use of 'this' pointer? Which c++ operator cannot overload? What is vectorial capacity? Write about an iterator class? Write a struct time where integer m, h, s are its members?