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 |
What is the general form of #line preprocessor?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
What is the difference between pure virtual function and virtual function?
What is #pragma directive?how it is used in the program? what is its advantages and disadvantages?
print pattern 1 1 33 33 555 555 77777777 555 555 33 33 1 1
What is ## preprocessor operator in c?
What are data types in c language?
What is structure and union in c?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs?
Is return a keyword in c?
What is a const pointer?