Cpp Programming Quiz 101 – What will be the output of the following program?
Question: What will be the output of the following program? #include class A { public: void BixFunction(void) { cout
Question: What will be the output of the following program? #include class A { public: void BixFunction(void) { cout
Question: What will be the output of the following program? #include class IndiaBix { static int count; public: static void First(void) { count = 10; } static void Second(int x) { count = count + x; } static void Display(void)…
Question: What will be the output of the following program? #include #include class IndiaBix { int val; public: void SetValue(char *str1, char *str2) { val = strcspn(str1, str2); } void ShowValue() { cout
Question: Which of the following statement is correct about the program given below? #include class IndiaBix { int x; float y; public: void Function() { x = 4; y = 2.50; delete this; } void Display() { coutDisplay(); return 0;…
Question: What will be the output of the following program? #include #include class IndiaBix { char str[50]; char tmp[50]; public: IndiaBix(char *s) { strcpy(str, s); } int BixFunction() { int i = 0, j = 0; while(*(str + i)) {…
Question: What will be the output of the following program? #include class Bix { public: int x; }; int main() { Bix *p = new Bix(); (*p).x = 10; cout
Question: What will be the output of the following program? #include class BixBase { public: float x; }; class BixDerived : public BixBase { public: char ch; void Process() { ch = (int)((x=12.0)/3.0); } void Display() { coutProcess(); objDev->Display(); return…
Question: What will be the output of the following program? #include class BixTeam { int x, y; public: BixTeam(int xx) { x = ++xx; } void Display() { cout
Question: Which of the following statement is correct about the program given below? #include class BixData { int x, y, z; public: BixData(int xx, int yy, int zz) { x = ++xx; y = ++yy; z = ++zz; } void…
Question: Which of the following statement is correct about the program given below? #include class BixBase { int x, y; public: BixBase(int xx = 10, int yy = 10) { x = xx; y = yy; } void Show() {…