C++ | Class and Object | Question 3

Last Updated :
Discuss
Comments

What will be the output?

C++
class Test {
    int x; 
};
int main()
{
  Test t;
  cout << t.x;
  return 0;
}

0

Garbage Value

Compiler Error

None of the Above

Share your thoughts in the comments