Answer Posted / madhu
'this' pointer is created when you create an object with
dynamic memory allocation. 'this' pointer will be created at
the time of object creation.
It holds the current object's address.
'this' cannot be used inside the static or a friend functions.
Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
Why do pointers exist?
What causes polymorphism?
What is a class in oop?
What is the important feature of inheritance?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
Why is encapsulation used?
What is for loop and its syntax?
Why do we use encapsulation in oops?
Which language is not a true object oriented programming language?
Can we create object of abstract class?
What is abstraction in oop with example?
Can you explain polymorphism?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
What is the highest level of cohesion?
Describe these concepts: Polymorphism, Inheritance and Abstraction.