Which is the parameter that is added to every non-static
member function when it is called?
Answer Posted / manjunath
Ex:
class Employee{
public:
int member_Function1(){}
void display()
{
do something;
}
};
int main()
{
Employee e1;
e1.member_Functiuon(int a, int b);------> refer below
1...
}
1...
Here e1 is an object of Employee Class.
Now e1.member_Function(int a, int b) means
implicitly the this pointer is applied to the
function as
member_Function(Employee *const this, int a, int b).
Here the implicit this is a constant pointer to the
object's address of type Employee. Once the Object has been
created the address is given to it(e1). the address is
passed as the first argument becoz the function resolving
is faster...
Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
What is this pointer in oop?
What is object and example?
What is overloading and its types?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout<
What does <> mean pseudocode?
can inline function declare in private part of class?
How do you use inheritance in unity?
What does sksksk mean in text slang?
What are the advantages of polymorphism?
What is abstraction oop?
What is the difference between procedural programming and oops?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What is encapsulation selenium?
What is destructor give example?
explain sub-type and sub class? atleast u have differ it into 4 points?