1

Which of the following is the correct way to create an object of the class Sample? 1. Sample s = new Sample(); 2. Sample s; 3. Sample s; s =new Sample(); 4. s = new Sample();

Correct Answer: 1,3

Make the most of this question

This page focuses on one C++ MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

C++ MCQs MCQ: Which of the following is the correct way to create an object of the class Sample? 1. Sample s = new Sample(); 2. Sample s; 3. Sample s; s =new Sample(); 4. s = new Sample(); | Extra Education