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
Why polymorphism is used in oops?
Why is polymorphism used?
What is the important feature of inheritance?
What is the main purpose of inheritance law?
What is the diamond problem in inheritance?
What is the renewal class?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
What is polymorphism and its types?
What is abstract class in oop?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
write a program that takes input in digits and display the result in words from 1 to 1000
What type of loop is a for loop?
What is polymorphism what is it for and how is it used?
What is advantage of inheritance?
What are the components of marker interface?