Briefly explain various access specifiers in C++.
Answer / Atalesh Kumar Verma
In C++, there are three access specifiers: public, private, and protected. Public members can be accessed both inside and outside the class. Private members can only be accessed within the class itself. Protected members can be accessed within the class and its derived classes but not from outside the class.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is partial specialization or template specialization?
Without using third variable write a code to swap two numbers.
What does malloc return in C and C++?
Define type casting in C++.
What is the difference between an ARRAY and a LIST in C++?
Write a C++ Program to Check Whether a character is Vowel or Consonant.
What is a memory leak in C++?
What do you know about Volatile keyword in C++? Explain with an example code.
What are string library functions(syntax).
What is the 4 difference between delete[] and delete?
What is wrong with this statement? std::auto_ptr ptr(new char[10]);
What is the difference between creating an object, using 'new' and using 'malloc'?