Write 7 differences between "Public" function and
"Private" function?
Answers were Sorted based on User's Feedback
Answer / shankar
1. Public Functions are available to any member of the
class and Object of the class, while private functions are
available to member functions of the same class.
2. Public functions can be inherited, but private can't.
3. By making function Private we implement encapsulation,
but with public method we don't.
4 Private functions are not available in interfaces.
Interfaces only contains Public methods.
5. Private Method though it declare Static will not be
available By using Class Name.
7. Private functions can never be declared as abstract but
Public functions can be.
6. Public functions are defined using 'Public' keyword and
Private functions are defined using 'Private' keyword.
| Is This Answer Correct ? | 52 Yes | 2 No |
Answer / sriram
we can't access private function to the outside of the
package simply the scope of the function is with in the
function only
| Is This Answer Correct ? | 10 Yes | 14 No |
design class for linked list and include constructor,destructor,insert option. struct node { int node; struct node &ptr; }
Which is the best institute in hyderabad for C/C++ and it also has fast track course structure.
what do you mean by static member variable?
advantage and disadvantage in c++>>oops and what are the questions ask for interview in c++>>oops. could you tell me or reply me
Write A Program using Single and Multiple Inheritance.
Which is not an object oriented programming language?
What are oops functions?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
What is virtual constructors/destructors?
What is an advantage of polymorphism?
What are the fields of vtable
Program to check whether a word starts with a capital letter or not.