Which of the following statement is correct about the program given below? #include<iostream.h>
class CuriousTab
{
static int x;
public:
static void SetData(int xx)
{
x = xx;
}
void Display()
{
cout<< x ;
}
};
int CuriousTab::x = 0;
int main()
{
CuriousTab::SetData(33);
CuriousTab::Display();
return 0;
}
Correct Answer: The program will report compile time error.
Discussion & Comments