Request New Subject
Home
Computer Science Engineering (CSE)
Object Oriented Programming (OOP)
Q. Predict the output?#include <iostream> using namespace std;class Test{int x;Test() { x = 5;}};int main(){Test *t = new Test; cout <<t->x;} (Solved)
1. compile time error
2. garbage
a. compile time error
Related Topics
→ Computer Architecture and Organization
→ Microprocessor and Interfacing Technique
→ Computer Networks
→ Data Structure and Algorithms (DSA)
→ Operating System (OS)
→ Artificial Intelligence and Robotics (AIR)
→ Software Project Management (SPM)
→ Computer Fundamentals
→ High Performance Computing (HPC)
→ Data Communication and Computer Network
Subscribe Now
Get All Updates & News
Subscribe