MCQOPTIONS
Bookmark
Saved Bookmarks
→
C++ Programming
→
Constructors And Destructors in C++ Programming
→
How many objects can be created from an abstract c..
1.
How many objects can be created from an abstract class?
A.
Zero
B.
One
C.
Two
D.
As many as we want
Answer» B. One
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
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(1, 2, 3); objData.Show(); return 0; }
Which of the following means ''The use of an object of one class in definition of another class''?
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(1, 2, 3); objData.Show(); return 0; }
What will be the output of the following program? #include<iostream.h> #include<string.h> class IndiaBix { int val; public: void SetValue(char *str1, char *str2) { val = strcspn(str1, str2); } void ShowValue() { cout<< val; } }; int main() { IndiaBix objBix; objBix.SetValue((char*)"India", (char*)"Bix"); objBix.ShowValue(); return 0; }
Which of the following statement is correct about the program given below? #include<iostream.h> class BixBase { int x, y; public: BixBase(int xx = 10, int yy = 10) { 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(10, 20); return 0; }
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 = 4; y = 2.50; delete this; } void Display() { cout<< x << " " << y; } }; int main() { IndiaBix *pBix = new IndiaBix(); pBix->Function(); pBix->Function(); pBix->Display(); return 0; }
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 == 1) exit(0); else x++; } void Display() { cout<< x << " "; } }; int IndiaBix::x = 0; int main() { IndiaBix objBix1; objBix1.Display(); IndiaBix objBix2; objBix2.Display(); return 0; }
What will be the output of the following program? #include<iostream.h> class Point { int x, y; public: Point(int xx = 10, int yy = 20) { 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 objP1; Point objP2(1, 2); Point objP3 = objP1 + objP2; objP3.Display(); return 0; }
Which of the following statement is correct about the program given below? #include<iostream.h> class BixBase { int x, y; public: BixBase(int xx = 10, int yy = 10) { 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(10, 20); return 0; }
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 = 0, j = 0; while(*(str + i)) { if(*(str + i++) == ' ') *(tmp + j++) = *(str + i); } *(tmp + j) = 0; return strlen(tmp); } }; int main() { char txt[] = "Welcome to IndiaBix.com!"; IndiaBix objBix(txt); cout<< objBix.BixFunction(); return 0; }
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply