Cpp Programming Quiz 240 – What will be the output of the following program?
[A].
6 6 4
[B].
6 6 5
[C].
5 40 38
[D].
6 40 38
Answer: Option D
Explanation:
No answer description available for this question.
6 6 5
[C].
5 40 38
[D].
6 40 38
Answer: Option D
Explanation:
No answer description available for this question.
#include
class IndiaBix
{
static int x;
public:
static void SetData(int xx)
{
this->x = xx;
}
static void Display()
{
cout<< x ;
}
};
int IndiaBix::x = 0;
int main()
{
IndiaBix::SetData(22);
IndiaBix::Display();
return 0;
}
[A].The program will print the output 0.
[B].The program will print the output 22.
[C].The program will print the output Garbage.
[D].The program will report compile time error.
Answer: Option D
Answer: Option C
Answer: Option B
Object constructor
[C].
Dynamic constructor
[D].
Copy constructor
Answer: Option D
Explanation:
No answer description available for this question.
Answer: Option D