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


Please Help Members By Posting Answers For Below Questions

What is this pointer in oop?

788


What is object and example?

871


What is overloading and its types?

821


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1634


What does <> mean pseudocode?

840


can inline function declare in private part of class?

3966


How do you use inheritance in unity?

795


What does sksksk mean in text slang?

1835


What are the advantages of polymorphism?

756


What is abstraction oop?

818


What is the difference between procedural programming and oops?

769


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

2977


What is encapsulation selenium?

751


What is destructor give example?

810


explain sub-type and sub class? atleast u have differ it into 4 points?

2039