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
Whats oop mean?
What is object and example?
What is inheritance write a program to show use of inheritance?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
Why do we use polymorphism?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
What is class and object with example?
what type of questions
Which is not an object oriented programming language?
How oops is better than procedural?
Why do we use polymorphism in oops?
Advantage and disadvantage of routing in telecom sector
How is polymorphism achieved?
What is difference between abstraction and encapsulation?
Why is abstraction used?