Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

Cpp Programming

Cpp Programming Quiz 221 – A union that has no constructor can be initialized with another union of __________ type.

Question: A union that has no constructor can be initialized with another union of __________ type.
[A].
different
[B].same
[C].

virtual
[D].

class

Answer: Option B

Explanation:

No answer description available for this question.

Cpp Programming Quiz 221 – A union that has no constructor can be initialized with another union of __________ type. Read More »

Constructors And Destructors, Cpp Programming

Cpp Programming Quiz 222 – To ensure that every object in the array receives a destructor call, always delete memory allocated as an array with operator __________ .

Question: To ensure that every object in the array receives a destructor call, always delete memory allocated as an array with operator __________ .
[A].
destructor
[B].

delete
[C].

delete[]
[D].

kill[] 

Answer: Option C

Explanation:

No answer description available for this question.

Cpp Programming Quiz 222 – To ensure that every object in the array receives a destructor call, always delete memory allocated as an array with operator __________ . Read More »

Constructors And Destructors, Cpp Programming

Cpp Programming Quiz 223 – Which of the following statement is correct about the program given below?

Question: Which of the following statement is correct about the program given below?

[A].
The program will print the output 25.
[B].

The program will print the output Garbage-value.
[C].

The program will report compile time error.
[D].

The program will report runtime error. 

Answer: Option C

Explanation:

No answer description available for this question.

Cpp Programming Quiz 223 – Which of the following statement is correct about the program given below? Read More »

Constructors And Destructors, Cpp Programming

Cpp Programming Quiz 224 – Which of the following statement is correct about the program given below?

Question: Which of the following statement is correct about the program given below?

[A].
The program will print the output 5.
[B].

The program will print the output Garbage-value.
[C].

The program will report compile time error.
[D].

The program will report runtime error. 

Answer: Option A

Explanation:

No answer description available for this question.

Cpp Programming Quiz 224 – Which of the following statement is correct about the program given below? Read More »

Constructors And Destructors, Cpp Programming

Cpp Programming Quiz 225 – Which of the following statement is correct?

Question: Which of the following statement is correct?
[A].
Constructor has the same name as that of the class.
[B].

Destructor has the same name as that of the class with a tilde symbol at the beginning.
[C].

Both A and B.
[D].

Destructor has the same name as the first member function of the class. 

Answer: Option C

Explanation:

No answer description available for this question.

Cpp Programming Quiz 225 – Which of the following statement is correct? Read More »

Constructors And Destructors, Cpp Programming

Cpp Programming Quiz 226 – A __________ is a constructor that either has no parameters, or if it has parameters, all the parameters have default values.

Question: A __________ is a constructor that either has no parameters, or if it has parameters, all the parameters have default values.
[A].
default constructor
[B].

copy constructor
[C].

Both A and B
[D].

None of these 

Answer: Option A

Explanation:

No answer description available for this question.

Cpp Programming Quiz 226 – A __________ is a constructor that either has no parameters, or if it has parameters, all the parameters have default values. Read More »

Constructors And Destructors, Cpp Programming

Cpp Programming Quiz 227 – __________ used to make a copy of one class object from another class object of the same class type.

Question: __________ used to make a copy of one class object from another class object of the same class type.
[A].
constructor
[B].

copy constructor
[C].

destructor
[D].

default constructor 

Answer: Option B

Explanation:

No answer description available for this question.

Cpp Programming Quiz 227 – __________ used to make a copy of one class object from another class object of the same class type. Read More »

Constructors And Destructors, Cpp Programming

Cpp Programming Quiz 229 – Which of the following statement is correct about the program given below?

Question: Which of the following statement is correct about the program given below?

[A].
The program will print the output 76.
[B].

The program will print the output 108.
[C].

The program will print the output garbage value.
[D].

The program will report compile time error. 

Answer: Option A

Explanation:

No answer description available for this question.

Cpp Programming Quiz 229 – Which of the following statement is correct about the program given below? Read More »

Constructors And Destructors, Cpp Programming

Cpp Programming Quiz 230 – A constructor that accepts __________ parameters is called the default constructor.

Question: A constructor that accepts __________ parameters is called the default constructor.
[A].
one
[B].

two
[C].

no
[D].

three 

Answer: Option C

Explanation:

No answer description available for this question.

Cpp Programming Quiz 230 – A constructor that accepts __________ parameters is called the default constructor. Read More »

Constructors And Destructors, Cpp Programming