Which is the parameter that is added to every non-static
member function when it is called?

Answers were Sorted based on User's Feedback



Which is the parameter that is added to every non-static member function when it is called?..

Answer / manish kumar

(this) pointer is added.
this pointer contains the address of the object through
which function is called.
this->data member will give the data of the object.

Is This Answer Correct ?    49 Yes 4 No

Which is the parameter that is added to every non-static member function when it is called?..

Answer / arun

"this" (i.e. Pointer to the object which call the member
function) is passed as the argument when a member function
is called.

Is This Answer Correct ?    21 Yes 1 No

Which is the parameter that is added to every non-static member function when it is called?..

Answer / 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

More OOPS Interview Questions

what is the technical or oop name of object?

1 Answers  


Can we create object of abstract class?

0 Answers  


What is abstraction in oops with example?

0 Answers  


Why is polymorphism important in oop?

0 Answers  


What is polymorphism oop?

0 Answers  






What is Method overloading?

5 Answers  


DIFFRENCE BETWEEN STRUCTURED PROGRAMING AND OBJCET ORIENTED PROGRAMING.

5 Answers  


How is exception handling carried out in c++?

3 Answers  


What is difference between inheritance and polymorphism?

0 Answers  


Which is not an object oriented programming language?

0 Answers  


why to use operator overloading

3 Answers  


what is polymorphism?

4 Answers  


Categories