What are the c++ access specifiers?



What are the c++ access specifiers?..

Answer / hrpynux@gmail.com

In C++, there are three access specifiers: public - members are accessible from outside the class. private - members cannot be accessed (or viewed) from outside the class. protected - members cannot be accessed from outside the class, however, they can be accessed in inherited classes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is abstraction with real time example?

0 Answers  


How to change constant values?

6 Answers   Huawei, Symphony,


Write a program to get the value of sin (x) using a library function , when x is given in degrees.

1 Answers  


What is linked list in c++?

0 Answers  


When is dynamic checking necessary?

0 Answers  






When does the c++ compiler create temporary variables?

0 Answers  


C++ program output? Explain output of this program. #include <iostream> using std::cout; using std::cin; int main() {   cout<<cout<<' ';   cout<<cin;   return 0; } It prints some address in hexadecimal. what is it?

1 Answers  


Which of the following operator cannot be overloaded?

2 Answers   TCL,


Implement stack operations with pointers with appropriate exception checks.

0 Answers   Huawei,


Will a catch statement catch a derived exception if it is looking for the base class?

0 Answers  


which is the easy way to divide any integer by 2?

2 Answers   Persistent,


How did c++ start?

0 Answers  


Categories