Consider the code below class Fred public Fred int main Fred a-04138
Consider the code below,<br>class Fred { public: Fred(); ... }; int main() { Fred a[10]; Fred* p = new Fred[10]; ... } Select the best option,
This multiple choice question (MCQ) is related to the book/course vu cs304 Object Oriented Programming. It can also be found in vu cs304 Mid Term - Quiz No.5.
Consider the code below,
class Fred { public: Fred(); ... }; int main() { Fred a[10]; Fred* p = new Fred[10]; ... } Select the best option,
class Fred { public: Fred(); ... }; int main() { Fred a[10]; Fred* p = new Fred[10]; ... } Select the best option,
Fred a[10]; calls the default constructor 11 times Fred* p = new Fred[10]; calls the default constructor 11 times
Fred a[10]; calls the default constructor 09 times Fred* p = new Fred[10]; calls the default constructor 10 times
Produce an error
Fred a[10]; calls the default constructor 10 times Fred* p = new Fred[10]; calls the default constructor 10 times