Skip to content

Tag Archives: Class and Object

class Test {     int x;  }; int main() {   Test t;   cout << t.x;   return 0; } (A) 0 (B) Garbage Value (C) Compiler Error… Read More
Predict the output of following C++ program #include<iostream> using namespace std;     class Empty {};     int main() {   cout << sizeof(Empty);   return 0; }… Read More
What is the difference between struct and class in C++? (A) All members of a structure are public and structures don’t have constructors and destructors… Read More

Start Your Coding Journey Now!