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 Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2110


What are oops functions?

588


Which is not an object oriented programming language?

544


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2172


What is property in oops?

571






Is abstract thinking intelligence?

601


What is the difference between inheritance and polymorphism?

594


What is polymorphism what is it for and how is it used?

576


Explain the concepts involved in Object Oriented programming.

644


Which language is not a true object oriented programming language?

646


What is polymorphism in oops with example?

533


write string class as your own class in java without using any built-in function

1980


What is oops in simple words?

585


What is overloading and its types?

619


What is difference between abstraction and encapsulation?

594