ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  OOPS
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
Which is the parameter that is added to every non-static 
member function when it is called?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Which is the parameter that is added to every non-static member function when it is called?
Answer
# 1
(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 ?    0 Yes 0 No
Manish Kumar
 
  Re: Which is the parameter that is added to every non-static member function when it is called?
Answer
# 2
"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 ?    0 Yes 0 No
Arun
 
 
 
  Re: Which is the parameter that is added to every non-static member function when it is called?
Answer
# 3
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 ?    0 Yes 0 No
Manjunath
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
what is a virtual class? Cap-Gemini1
Why and when is a virtual destructor needed?  2
When is it necessary to use member-wise initialization list in C++?  1
What is Inheritance, Multiple Inheritance, Shared and Repeatable Inheritance? Accenture3
how to create thread in java? Infosys10
the difference between new and malloc Siemens3
Does c++ support multilevel and multiple inheritance? Wipro5
What is the outcome of the line of code "cout<<abs(- 16.5);"? 1) 16 2) 17 3) 16.5 TCS10
What is the difference between pass by reference and pass by value? TCS6
Explain polymorphism? What r the types of polymorphism? pls give examples? HCL2
When a private constructer is being inherited from one class to another class and when the object is instantiated is the space reserved for this private variable in the memory?? Honeywell12
What is the difference between an object and a class?  2
different types of castings Siemens3
Can we have a private virtual method ? Ness-Technologies5
What will happen when the following code is run: int x; while(x<100) { cout<<x; x++; } 1) The computer will output "0123...99" 2) The computer will output "0123...100" 3) The output is undefined  3
what is the use of mutable key word HCL2
What is Method overloading?  4
What is R T T I ? Ness-Technologies3
Write a macro for swapping integers  3
how to swap to variables without using thrid variable in java?  3
 
For more OOPS Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com