In C++, the class without constructors, functions or data members is known as empty class. A constructor is a member function of the class that initializes the objects of the class. The constructor is automatically called when object is created.
A function of a class is similar to any other variable that has its definition within the class.
Further Explanation:
Code: Following is the C++ code to create a class named as Acc1 with no constructors, functions or data members i.e. empty class.
//header file for input and output
#include<iostream>
using namespace std;
class Acc1{
};
// main function starts here
int main() {
Acc1 a1;
return 0;
}
Learn more:
1. A company that allows you to license software monthly to use online is an example of ? brainly.com/question/10410011
2. Prediction accuracy of a neural network depends on _______________ and ______________. brainly.com/question/10599832
3. The shape of our galaxy was determined ‘on the inside looking out' by surveying the milky way using ____________ telescopes. brainly.com/question/7866623
Answer details:
Grade: Senior Secondary School
Subject: Computer Science
Chapter: C++ Programming
Keyword:
Java, input, output, programming, statements, if-else, loops, print, string, while, public, void, static, main, number, C++, C, class, member function, constructor, destructor, variables, data members, empty class, Acc1, class definition, last character, one, ell