what is COPY CONSTRUCTOR and what is it used for?
No Answer is Posted For this Question
Be the First to Post Answer
class A { public: void f(); protected: A() {} A(const A&){} }; Examine the class declaration shown above. Why are the default and copy constructors declared as protected? 1. To ensure that A cannot be created via new by a more derived class 2. To ensure that A cannot be copied 3. To ensure that A cannot be used as a base class except when public inheritance has been used 4. To ensure that A cannot be created/copied outside the inheritance chain 5. To ensure that A cannot be instantiated as a static variable
How a new element can be added or pushed in a stack?
Write a program to get the value of sin (x) using a library function , when x is given in degrees.
What is difference between n and endl in c++?
Is c++ a software?
What is the use of ::(scope resolution operator)?
class Foo { const int x; protected: Foo(int f); ~Foo(); }; Foo f; Referring to the sample code above, why will the class declaration not compile? a) The variable x is const. b) The destructor is protected. c) The destructor is not public. d) The constructor is protected. e) There is no default constructor.
How do I tokenize a string in c++?
Difference between delete and free.
an integer constant must have atleast one a) character b) digit c) decimal point
Difference between a copy constructor and an assignment operator.
Can java be faster than c++?