When does a 'this' pointer get created?
No Answer is Posted For this Question
Be the First to Post Answer
How did c++ start?
Evaluate: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); a) 10 b) 11 c) 1
Explain the use of this pointer?
Explain the volatile and mutable keywords.
What is data abstraction? How is it different from data encapsulation?
What is the return value of the insertion operator?
How to construct virtual constructor
6 Answers CIStems Software, Symphony,
What is your strongest programming language (Java, ASP, C, C++, VB, HTML,C#, etc.)?
24 Answers Infosys, Microsoft, TCS,
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
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);
Write a short code using c++ to print out all odd number from 1 to 100 using a for loop
How do you print a string on the printer?