Explain the differences between public, protected, private
and internal.
Answer Posted / rahul_kumar007
public:-
--------- It means we can access the property of public;
directly from out side of the class.
private:-
---------- it means we can't access the property of
private;
directly from out side the class.
and we can't intilizing the member var during run time
we have to use constuctor.
proctected:-
If we wnat to inherit private data member only onces.
then we make them protcted
Is This Answer Correct ? | 10 Yes | 11 No |
Post New Answer View All Answers
Why pointers are used?
What is pre-emptive data structure and explain it with example?
How many keywords (reserve words) are in c?
Give the rules for variable declaration?
What is the difference between mpi and openmp?
What are the application of void data type in c?
number of times a digit is present in a number
What is structure pointer in c?
which is an algorithm for sorting in a growing Lexicographic order
What is a function in c?
can we implement multi-threads in c.
Is main an identifier in c?
What is 2c dna?
Where register variables are stored in c?
Write a program to identify if a given binary tree is balanced or not.