Why static functions always uses static variables?
Answers were Sorted based on User's Feedback
Answer / george from psg
static function is constant to all object. In the same way
static variable is constant to all so we use static variable
in static function
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / som shekhar
If you take in the context of the class, static member
functions cannot be called by the ordinary objects because
when normal object calls the function then address of the
object is passed is collected by "this" pointer and static
member function don't have "this" pointer.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / harsha
context,object are created in RAM. context is created
once.static methods implementaion , static varibles loads
into context only once.All those staic members avilable to
each other obviously.
| Is This Answer Correct ? | 2 Yes | 3 No |
write a program to find 2 power of a 5digit number with out using big int and exponent ?
How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
What are the three main types of variables?
What is destructor oops?
How can you overcome the diamond problem in inheritance?
Plese get me a perfect C++ program for railway/airway reservation with all details.
why oops need in programming
What is an example of genetic polymorphism?
what are the ways in which a constructors can be called?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What is the benefit of oop?
what type of questions