A
Q. Suppose the integers take 4 bytes, what is the output of the following code?
Code:
#include<iostream>
using namespace std;
class MyClass
{
static int a;
int b;
};
int MyClass::a;
int main()
{
cout << sizeof(MyClass);
return 0;
}
using namespace std;
class MyClass
{
static int a;
int b;
};
int MyClass::a;
int main()
{
cout << sizeof(MyClass);
return 0;
}
- Correct Answer - Option(A)
- Views: 5
- Filed under category C++
- Hashtags:
Discusssion
Login to discuss.