What will be the output of the following program?
#include<iostream.h>
class Bix
{
public:
int x;
};
int main()
{
Bix *p = new Bix();
(*p).x = cout<< (*p).x << " " << p->x << " " ;
p->x = cout<< (*p).x << " " << p->x ;
return}What will be the output of the following program?
#include<iostream.h>
class A
{
public:
void BixFunction(void)
{
cout<< "Class A" << endl;
}
};
class B: public A
{
public:
void BixFunction(void)
{
cout<< "Class B" << endl;
}
};
class C : public B
{
public:
void BixFunction(void)
{
cout<< "Class C" << endl;
}
};
int main()
{
A *ptr;
B objB;
ptr = &objB;
ptr = new C();
ptr->BixFunction();
return
}What will be the output of the following program?
#include<iostream.h>
class IndiaBix
{
static int count;
public:
static void First(void)
{
count = }
static void Second(int x)
{
count = count + x;
}
static void Display(void)
{
cout<< count << endl;
}
};
int IndiaBix::count =
int main()
{
IndiaBix :: First();
IndiaBix :: Second(5);
IndiaBix :: Display();
return
}What will be the output of the following program?
#include<iostream.h>
class India
{
public:
struct Bix
{
int x;
float y;
void Function(void)
{
y = x = (x = 4*4);
y = --y * y;
}
void Display()
{
cout<< y << endl;
}
}B;
}I;
int main()
{
I.B.Display();
return}How many objects can be created from an abstract class?
Which of the following can be overloaded?
Which of the following statements is correct when a class is inherited publicly?
Which of the following statement is correct about the program given below?
#include<iostream.h>
class IndiaBix
{
static int x;
public:
static void SetData(int xx)
{
x = xx;
}
void Display()
{
cout<< x ;
}
};
int IndiaBix::x =
int main()
{
IndiaBix::SetData(33);
IndiaBix::Display();
return
}Which of the following statement is correct about the program given below?
#include<iostream.h>
class BixBase
{
int x, y;
public:
BixBase(int xx =int yy = {
x = xx;
y = yy;
}
void Show()
{
cout<< x * y << endl;
}
};
class BixDerived : public BixBase
{
private:
BixBase objBase;
public:
BixDerived(int xx, int yy) : BixBase(xx, yy), objBase(yy, yy)
{
objBase.Show();
}
};
int main()
{
BixDerived objDev(20);
return
}What will be the output of the following program?
#include<iostream.h>
class BixBase
{
public:
float x;
};
class BixDerived : public BixBase
{
public:
char ch;
void Process()
{
ch = (int)((x=12.0)/3.0);
}
void Display()
{
cout<< (int)ch;
}
};
int main()
{
class BixDerived *objDev = new BixDerived;
objDev->Process();
objDev->Display();
return
}What will be the output of the following program?
#include<iostream.h>
#include<string.h>
class IndiaBix
{
int val;
public:
void SetValue(char *strchar *str {
val = strcspn(strstr2);
}
void ShowValue()
{
cout<< val;
}
};
int main()
{
IndiaBix objBix;
objBix.SetValue((char*)"India", (char*)"Bix");
objBix.ShowValue();
return
}What does the class definitions in following code represent?
class Bike
{
Engine objEng;
};
class Engine
{
float CC;
};Which of the following means "The use of an object of one class in definition of another class"?
Which of the following statements is correct about the constructors and destructors?
Which of the following statement is correct about the program given below?
#include<iostream.h>
class IndiaBix
{
static int x;
public:
static void SetData(int xx)
{
x = xx;
}
static void Display()
{
cout<< x ;
}
};
int IndiaBix::x =
int main()
{
IndiaBix::SetData(44);
IndiaBix::Display();
return
}What will be the output of the following program?
#include<iostream.h>
class BixTeam
{
int x, y;
public:
BixTeam(int xx)
{
x = ++xx;
}
void Display()
{
cout<< --x << " ";
}
};
int main()
{
BixTeam objBT(45);
objBT.Display();
int *p = (int*)&objBT;
*p = objBT.Display();
return
}What happens when we try to compile the class definition in following code snippet?
class Birds {};
class Peacock : protected Birds {};What will be the output of the following program?
#include<iostream.h>
class Point
{
int x, y;
public:
Point(int xx =int yy = {
x = xx;
y = yy;
}
Point operator + (Point objPoint)
{
Point objTmp;
objTmp.x = objPoint.x + this->x;
objTmp.y = objPoint.y + this->y;
return objTmp;
}
void Display(void)
{
cout<< x << " " << y;
}
};
int main()
{
Point objP Point objP2(2);
Point objP3 = objP1 + objP objP3.Display();
return
}Which of the following statement is correct about the program given below?
#include<iostream.h>
#include<process.h>
class IndiaBix
{
static int x;
public:
IndiaBix()
{
if(x == exit(0);
else
x++;
}
void Display()
{
cout<< x << " ";
}
};
int IndiaBix::x =
int main()
{
IndiaBix objBix
objBix1.Display();
IndiaBix objBix
objBix2.Display();
return
}Which of the following statement is correct about the program given below?
#include<iostream.h>
#include<string.h>
class IndiaBix
{
public:
void GetData(char *s, int x, int y )
{
int i = for (i = x-y>i++)
{
cout<< s[i];
y--;
}
}
};
int main()
{
IndiaBix objBix;
objBix.GetData((char*)"Welcome!",3);
return
}