Exam 4: C++ Programming and Concepts: Inheritance, Data Types, Objects, and Output Prediction
Exam 1: C++ Class and Function Fundamentals21 Questions
Exam 2: C++ Function and Array25 Questions
Exam 3: C++ Programming Concepts25 Questions
Exam 4: C++ Programming and Concepts: Inheritance, Data Types, Objects, and Output Prediction23 Questions
Select questions type
What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor?
(Multiple Choice)
4.9/5
(47)
Predict the output?#include <iostream> using namespace std;class Test{int x;Test() { x = 5;}};int main(){Test *t = new Test; cout <<t->x;}
(Multiple Choice)
4.8/5
(39)
#include<iostream> using namespace std; class Point {public:Point() { cout <<"Constructor called"; }};int main(){Point t1, *t2; return 0;}
(Multiple Choice)
4.8/5
(37)
Showing 21 - 23 of 23
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)