Which of the following statements is correct when a class is inherited privately?
Which of the following is the only technical difference between structures and classes in C++?
Which of the following access specifies is used in a class definition by default?
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)
{
this->x = xx;
}
static void Display()
{
cout<< x ;
}
};
int IndiaBix::x =
int main()
{
IndiaBix::SetData(22);
IndiaBix::Display();
return
}Which of the following statements is incorrect?
What will be the output of the following program?
#include<iostream.h>
#include<string.h>
class IndiaBix
{
char str[50];
char tmp[50];
public:
IndiaBix(char *s)
{
strcpy(str, s);
}
int BixFunction()
{
int i =j =
while(*(str + i))
{
if(*(str + i++) == ' ')
*(tmp + j++) = *(str + i);
}
*(tmp + j) =
return strlen(tmp);
}
};
int main()
{
char txt[] = "Welcome to IndiaBix.com!";
IndiaBix objBix(txt);
cout<< objBix.BixFunction();
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
{
private:
BixBase objBase;
public:
BixDerived(int xx, int yy) : objBase(xx, yy)
{
objBase.Show();
}
};
int main()
{
BixDerived objDev(20);
return
}Which of the following statement is correct about the program given below?
#include<iostream.h>
class BixData
{
int x, y, z;
public:
BixData(int xx, int yy, int zz)
{
x = ++xx;
y = ++yy;
z = ++zz;
}
void Show()
{
cout<< "" << x++ << " " << y++ << " " << z++;
}
};
int main()
{
BixData objData(3);
objData.Show();
return
}Which of the following statements is correct?
What does a class hierarchy depict?
Which of the following statements is correct about the program given below?
class Bix
{
public:
static void MyFunction();
};
int main()
{
void(*ptr)() = &Bix::MyFunction;
return
}Which of the following statement is correct with respect to the use of friend keyword inside a class?
Which of the following keywords is used to control access to a class member?
Which of the following statement is correct regarding destructor of base class?
Which of the following two entities (reading from Left to Right) can be connected by the dot operator?
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.Show();
}
};
int main()
{
BixDerived objDev(20);
return
}Which of the following statement is correct about the program given below?
#include<iostream.h>
class IndiaBix
{
int x;
float y;
public:
void Function()
{
x =
y = 2.delete this;
}
void Display()
{
cout<< x << " " << y;
}
};
int main()
{
IndiaBix *pBix = new IndiaBix();
pBix->Function();
pBix->Function();
pBix->Display();
return
}Which of the following statements are correct for a static member function?
How can we make a class abstract?
Which of the following can access private data members or member functions of a class?