ALLInterview.com :: Home Page            
 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   SiteMap shows list of All Categories in this site.
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 ?    14 Yes 3 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 ?    8 Yes 1 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 ?    7 Yes 0 No
Manjunath
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
how can we design a magic square in c++?or suggest me the basic idea of it.  3
How to call a non virtual function in the derived class by using base class pointer HCL3
difference between class and object Magic-Soft9
can we create and enter the data & hide files using programmes ? Wipro2
Can we create object of class with private constructor?  5
Please tell me the oops concept with detailed answer EEE8
What is public, protected, private? Satyam6
How to deploy web appliction in web logic ? Unisys1
what is object slicing TCS3
How would you stop a class from class from being derived or inherited. Ness-Technologies16
4. What do you mean by a prototype? Define analysis prototype  1
what is single inheritance? IBM16
 
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 © 2012  ALLInterview.com.  All Rights Reserved.

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