×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Can we create objects of a class with the definition of class?

184. Can we create objects of a class with the definition of class?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, we can create objects of class at the end of the class definition before the semicolon. For example.

	
class Sample {
int a, b;
}
obj1, obj2;

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.