MCQOPTIONS
Bookmark
Saved Bookmarks
→
Technical MCQs
→
2D Transformation And Answers
→
which of this can not be declared as virtual
1.
which of this can not be declared as virtual
A.
Constructor
B.
Destructor
C.
Both A & B
D.
None of the above
E.
Answer» D. None of the above
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
which of this can not be declared as virtual
#include <iostream>using namespace std;int i;class LFC{public: ~LFC() { i=10; }};int foo(){ i=3; LFC ob; return i;} int main(){ cout << foo() << endl; return 0;}19.If the copy constructor receives its arguments by value, the copy constructor would
#include <iostream>using namespace std;class LFC{ private: int x; public: void LFC(){x=0; printf("Object created.");} void LFC(int a){x=a;}};int main(){ LFC s; return 0;} 18.What will be the output of the following program?
#include <iostream>using namespace std;class LFC{ private: int x,y; public: void LFC(int a,int b) { x=a; y=b;}};int main(){ LFC s; return 0;}17.What will be the output of this program?
#include <iostream>using namespace std;class LFC{ int x; public: LFC(short ss) { cout<< "Short" << endl; } LFC(int xx) { cout<< "Int" << endl; } LFC(float ff) { cout<< "Float" << endl; } ~LFC() { cout<< "Final"; }};int main(){ LFC *ptr = new LFC('F'); return 0; }16.What will be the output of this program?
#include <iostream>using namespace std;class LFC{ int *p; public: LFC(int xx, char ch) { p = new int(); *p = xx + int(ch); cout<< *p; } ~LFC() { delete p; }};int main(){ LFC obj(15, 'A'); return 0;}15.Which of the following is true about the following program
#include <iostream>using namespace std;class LFC{ int x; public: LFC(); ~LFC(); void Show() const;};LFC::LFC(){ x = 50;}void LFC::Show() const{ cout<< x;}int main(){ LFC obj; obj.Show(); return 0; }14.Which of the following statement is correct about the program given below?
#include <iostream>using namespace std;class LFC{ public: LFC() { cout<< "find"; } ~LFC() { cout<< "course"; }};int main(){ LFC obj; return 0;}13.What is the output of this program?
#include <iostream>using namespace std;class LFC{ int x; public: LFC(int xx, float yy) { cout<< char(yy); }};int main(){ LFC *p = new LFC(35, 99.50f); return 0;}12.What is the output of this program?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies