What are the restrictions apply to constructors and destructors?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

How to reduce a final size of executable?

3 Answers  


Explain the concept of friend function in c++?

0 Answers  


Does there exist any other function which can be used to convert an integer or a float to a string?

0 Answers  


Explain differences between alloc() and free()?

0 Answers  


What are the implicit member functions of class?

0 Answers  






How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?

0 Answers  


How would you use the functions memcpy(), memset(), memmove()?

0 Answers  


Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)

0 Answers  


Is c better than c++?

0 Answers  


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

1 Answers  


class HasStatic { static int I; }; Referring to the sample code above, what is the appropriate method of defining the member variable "I", and assigning it the value 10, outside of the class declaration? a) HasStatic I = 10; b) int static I = 10; c) static I(10); d) static I = 10; e) int HasStatic::I = 10;

1 Answers   Quark,


What is the use of pointer in c++ with example?

0 Answers  


Categories