What are the advantages of using pointers in a program?
No Answer is Posted For this Question
Be the First to Post Answer
What are destructors?
Can we distribute function templates and class templates in object libraries?
program in c++ to input digits and print in words
Is empty stack c++?
Can we overload operator in c++?
class Alpha { public: char data[10000]; Alpha(); ~Alpha(); }; class Beta { public: Beta() { n = 0; } void FillData(Alpha a); private: int n; }; How do you make the above sample code more efficient? a) If possible, make the constructor for Beta private to reduce the overhead of public constructors. b) Change the return type in FillData to int to negate the implicit return conversion from "int" to "void". c) Make the destructor for Alpha virtual. d) Make the constructor for Alpha virtual. e) Pass a const reference to Alpha in FillData
Explain how would you handle a situation where you cannot call the destructor of a local explicitly?
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;
Write about all the implicit member functions of a class?
Which operations are permitted on pointers?
What is the main function c++?
What is the purpose of decltype?