Skip to content

Tag Archives: C++-this pointer

Predict the output of following C++ program? #include<iostream> using namespace std;    class Test { private:   int x; public:   Test() {x = 0;}   void destroy() … Read More
Predict the output of following C++ program #include<iostream> using namespace std;    class Test { private:   int x;   int y; public:   Test(int x = 0,… Read More
Predict the output of following C++ program. #include<iostream> using namespace std;    class Test { private:   int x; public:   Test(int x = 0) { this->x… Read More
What is the use of this pointer? (A) When local variable’s name is same as member’s name, we can access member using this pointer. (B)… Read More
Which of the following is true about this pointer? (A) It is passed as a hidden argument to all function calls (B) It is passed… Read More