Cpp Programming Quiz 194 – What will be the output of the following program?
#include
#include
class BixString
{
char x[50];
char y[50];
char z[50];
public:
BixString()
{ }
BixString(char* xx)
{
strcpy(x, xx);
strcpy(y, xx);
}
BixString(char *xx, char *yy = " C++", char *zz = " Programming!")
{
strcpy(z, xx);
strcat(z, yy);
strcat(z, zz);
}
void Display(void)
{
cout<< z << endl;
}
};
int main()
{
BixString objStr("Learn", " Java");
objStr.Display();
return 0;
}
[A].Java Programming!
[B].C++ Programming!
[C].Learn C++ Programming!
[D].Learn Java Programming!
Answer: Option D
Cpp Programming Quiz 194 – What will be the output of the following program? Read More »
Cpp Programming, Functions