Question 12
Question 13
#include <iostream>
class Test
{
public:
int i;
void get();
};
void Test::get()
{
std::cout << \"Enter the value of i: \";
std::cin >> i;
}
Test t; // Global object
int main()
{
Test t; // local object
t.get();
std::cout << \"value of i in local t: \"<<t.i<<\'\\n\';
::t.get();
std::cout << \"value of i in global t: \"<<::t.i<<\'\\n\';
return 0;
}
Question 16
#include<iostream>
using namespace std;
class Empty {};
int main()
{
cout << sizeof(Empty);
return 0;
}
Question 17
Which of the following is not correct (in C++) ?
There are 17 questions to complete.