What is the difference between member functions and static member functions?



What is the difference between member functions and static member functions?..

Answer / Archana Kumari

"Member functions can access both data members (instance variables) and static members of a class. On the other hand, static member functions can only access static members, not instance variables or non-static member functions. Static member functions are called using the class name instead of an object name."n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

Name the operators that cannot be overloaded.

2 Answers   Wipro,


What Is Polymorphism in C++ ?

3 Answers   IBS, Impetus, ITC Indian Tobacco Company, Motorola,


What is the difference between creating an object, using 'new' and using 'malloc'?

3 Answers   HFG, Siemens,


What are Agilent PRECOMPILERS?

1 Answers   Agilent,


How will you execute a stack using a priority queue? (Push and pop should be in O (1)).

1 Answers   Adobe,


What kind of problems does name mangling cause?

1 Answers   Amazon,


What does it mean to declare a member function as static in C++?

1 Answers   Amazon,


Write a program to read two numbers from the keyboard and display the larger value on the screen

1 Answers  


In C++ what is a vtable and how does it work?

1 Answers   Agilent,


What is conversion constructor in C++

1 Answers   TCS,


How does stack look in function calls? Write a recursive function call, how will the stack look like?

1 Answers   Adobe,


Describe the different styles of function prototypes in C++.

1 Answers   Adobe,


Categories