C++ | this pointer | Question 1
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 as a hidden argument to all non-static function calls
(C) It is passed as a hidden argument to all static functions
(D) None of the above
Answer: (B)
Explanation: The ‘this’ pointer is passed as a hidden argument to all non-static member function calls and is available as a local variable within the body of all non-static functions. ‘this’ pointer is a constant pointer that holds the memory address of the current object. ‘this’ pointer is not available in static member functions as static member functions can be called without any object (with class name).
Source: ‘this’ pointer in C++
Quiz of this Question
Recommended Posts:
- Double Pointer (Pointer to Pointer) in C
- C++ | this pointer | Question 2
- C++ | this pointer | Question 5
- C++ | this pointer | Question 3
- C++ | this pointer | Question 4
- C | Pointer Basics | Question 7
- C | Pointer Basics | Question 6
- C | Pointer Basics | Question 8
- C | Advanced Pointer | Question 1
- C | Pointer Basics | Question 13
- C | Advanced Pointer | Question 2
- C | Pointer Basics | Question 12
- C | Pointer Basics | Question 11
- C | Pointer Basics | Question 17
- C | Pointer Basics | Question 10



