how much classes are used in c++
Answers were Sorted based on User's Feedback
We can use more classes these are userdefined and builtin
classes
Is This Answer Correct ? | 17 Yes | 1 No |
Answer / saurabh
We can use as many classes as we want in our program..
By the way AMIT, main() is a function and not a class
Is This Answer Correct ? | 9 Yes | 1 No |
Answer / preeti goyal
In each program main is a function. but main is also hold
by a class so atleast one class is necessary.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / amit
WE CAN DEFINE AS MANY CLASSES AS WE WANT.THERE IS NO
RESTRICATION.BUT THERE IS ATLEST ONE CLASS i.e. main()
Is This Answer Correct ? | 8 Yes | 14 No |
What is abstraction oop?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?
Why a "operator=(...)" when there is a copy ctor?
what is a class
When is it necessary to use member-wise initialization list in C++?
Where is pseudocode used?
what is the abstract class,interface ,its difference with a programatic eg.? hi,recently i went for an interview they ask me what is abstract class ,interface and its difference I said abstract class contain abstact method ,abstract method is a method with no body.Abstract class cannot be instantiated.Abstract class is a base class it required derived class for the implementation of method. Interface is a syntactical contract that all derived class should follow it define properties ,method,events which are known as member of interface. Then They asked me what is the difference between them. I said abstract class interface 1.abstact class can implement method 1.interface cant 2.abstact class can contain constructor, 2.interface cant destructor 3.abstract class cannot support multiple 3.interface support inheritance etc Then they said some different answer I said dont no. Then they ask me when i should make abstract class for an project and when i should make interface. I said if suppose there is two class which must be having method with different logic then we sholud make abstract class. and if suppose we have two class having method .with different logic then we can make interface . Am i correct with my explaination.if not correct me .please provide me that when should we create abstract class and interface and what is difference .please help me
what is single inheritance?
What is operator overloading? Give Example
11 Answers CTS, IBM, TCS,
What is object in oop?
What is the difference between an object and a class?