Multiple Choice
Predict the output?#include <iostream> using namespace std;class Test{int x;Test() { x = 5;}};int main() {Test *t = new Test; cout <<t->x;}
A) compile time error
B) garbage
C) 0
D) 5
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q13: Which of the following interface determines how
Q14: What happens when delete is used for
Q15: Predict the output of following C++ program#include<iostream>
Q16: Which feature of C++ contain the concept
Q17: What is the difference between struct and
Q18: Which of the following is true about
Q19: Output of following program?#include<iostream> using namespace std;
Q20: class Test { int x;};int main(){Test t;
Q21: What happens when a class with parameterized
Q23: #include<iostream> using namespace std; class Point {public:Point()