When does a 'this' pointer get created?


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

Post New Answer

More C++ General Interview Questions

How did c++ start?

0 Answers  


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

4 Answers   Quark,


Explain the use of this pointer?

0 Answers  


Explain the volatile and mutable keywords.

0 Answers  


What is data abstraction? How is it different from data encapsulation?

0 Answers  






What is the return value of the insertion operator?

0 Answers  


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

2 Answers   Quark,


Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);

0 Answers  


Write a short code using c++ to print out all odd number from 1 to 100 using a for loop

0 Answers  


How do you print a string on the printer?

0 Answers  


Categories