what do you mean by static member variable?
Answers were Sorted based on User's Feedback
In C++ when you declare and define a static variable, it
tells the compiler that only one copy of memory will be
allocated and all the objects of that class will share that
copy.
As we know for class data variables memory will be created
independently for every object of that class. and we can
access the data using object. But, for static variables
memory is created only once for all objects and is no object
is owned the static variable. we can access the static
variable using class name.
Mainly static variables are used when want to count the
objects created and destroyed and when we are dealing with
singleton design pattern.
| Is This Answer Correct ? | 10 Yes | 0 No |
Answer / bhaskar
when static member variable executed that variable value is
automatically assigns to zero....
| Is This Answer Correct ? | 4 Yes | 3 No |
what is the difference between class and object?
20% of a 6 litre solution and 60% of 4 litre solution are mixed what the % of mixture of solution it is resulted into?
What is a superclass in oop?
What is overloading in oop?
how to find no of instances of an object in .NET?
Is html an oop?
what is the basic concept of inheritance?
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.
What is encapsulation in ict?
Is oop better than procedural?
how to tackle technical questions
What is the different between Applet and Application?