What are the three parts of a simple empty class?



What are the three parts of a simple empty class?..

Answer / Jayant Singh Rawat

"A simple empty class in Object-Oriented Programming consists of: 1. Class Name (for example, MyClass), 2. { Curly braces that contain the code for the class }, and 3. A semicolon at the end of the class declaration."n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is nutshell in programming language?

1 Answers   Satyam, Tech Mahindra,


What is pointer in oop?

1 Answers  


What are the components of marker interface?

1 Answers  


write a c++ program to find maximum of two numbers using inline functions.

3 Answers   IBM,


1.explicit call for destructor 2.calling function inside a constructor. 3.base *b-new derived delete b; 4.delete p what it will delete. 5.size of base class and derived class int i,in base class and int j in derived. 6.int i-20 int main() { int i =5; printf("%d".::i); { int i =10; printf("%d".::i); } } 7.object slicing 8.new 9.function overloading(return type). 10.class base() { virtuval fun() { ----- } } class derivied:public base() { fun() { ----- } } int main() { derived d; } 11.how static function will call in C++? 12.default structures are in C++? 13.constructors should be in public . 14.virtuval constructor not exist. 15.multilevel inhritence. destructor order.

1 Answers   Tech Mahindra,


How oops is better than procedural?

1 Answers  


Why is encapsulation used?

1 Answers  


What is difference between polymorphism and inheritance?

1 Answers  


WAP to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

1 Answers  


Write an operator overloading program to Overload ‘>’ operator so as to find greater among two instances of the class.

1 Answers  


DIFFRENCE BETWEEN STRUCTURED PROGRAMING AND OBJCET ORIENTED PROGRAMING.

5 Answers  


what is Class in oops with example?

4 Answers   HCL,


Categories