D
Q. What is the output of the following C++ code?
#include<iostream> using namespace std; class MyClass { public: MyClass(); }; MyClass::MyClass() { cout << "Constructor is called\n"; } int main() { cout << " Before \n"; MyClass myclass(); cout << " After \n"; return 0; }
Note that the line “MyClass maclass();” is not a constructor call. The compiler considers this line as a function declaration that receives no parameters and returns an object of type MyClass.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. Which of the following is not a standard exception built in C++.
Q. _____ are the kind of data that variables hold in a programming language.
Q. Which of the following concepts means wrapping up of data and functions together?
Q. Which of the following is not an advantage of secondary memory?
Q. What should be the output of below program?
Q. Find out the error in following block of code. If (x = 100) Cout << “x is 100”;
Q. In which of the following a virtual call is resolved at the time of compilation?
Q. Where a condition is checked to see whether to do one or more iteration is _____
Q. Which container provides random access iterators?
Q. How C++ compiler does differ between overloaded postfix and prefix operators?
Discusssion
Login to discuss.