Explain the differences between public, protected, private
and internal.
Answers were Sorted based on User's Feedback
Answer / avinash
public means we can access the code or data in public that
is visible to others.
protected means the code or data can be within the system
and,or it has no access to it.and it is not available.
private means it can be accessesed only by the person who
has the access or key to it.
| Is This Answer Correct ? | 1 Yes | 0 No |
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 |
How many loops are there in c?
What is the method to save data in stack data structure type?
How the C program can be compiled?
How do you redirect a standard stream?
Not all reserved words are written in lowercase. TRUE or FALSE?
What are the different data types in C?
Where we use clrscr in c?
WRITE A PROGRAM IN C TO MULTIPLY TWO 2-D ARRAYS
What's a good way to check for "close enough" floating-point equality?
what is use of malloc and calloc?
wtite a program that will multiply two integers in recursion function
why program counter is 16 bit?