What are the c++ access specifiers?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a map in c++?

578


What is the difference between new() and malloc()?

614


Define a conversion constructor?

606


Why do we use vector in c++?

595


What is a flag in c++?

603






What are the types of pointer?

544


What is a wchar_t in c++?

579


What do you mean by funtion prototype?

578


What is a tree in c++?

557


Is map thread safe c++?

628


How does c++ structure differ from c++ class?

580


What is a singleton class c++?

540


What are shallow and deep copy?

592


Write a program to add three numbers in C++ utilizing classes.

619


How many keywords are used in c++?

552