Q. Predict the output of following C++ program.
Code:#include<iostream>
using namespace std;
class Empty {};
int main() {
cout << sizeof(Empty);
return 0;
}
β
Correct Answer: (B)
A non-zero value
#include<iostream>
using namespace std;
class Empty {};
int main() {
cout << sizeof(Empty);
return 0;
}
You must be Logged in to update hint/solution