Q:

What is a class in C++?

0

What is a class in C++?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

A class in C++ is a user-defined type declared with a keyword class that has data and functions (called member variables and member functions).

Example,

class Test
{
   // some data
   // some functions
};

Access of class members is governed by the three access specifiers privateprotected, and public. By default access to members of a C++ class is private.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Interview Questions and Answers(2022)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What is an object in c++?... >>
<< What is the difference between C and C++?...