what is difference between static and non-static variables
Answer Posted / daxini
Static :
A static variable is defined for the class itself and exists independently of any object of that class.
non-static:
a non static variable is defined for object of the class thus it is bound to an instance of its class
| Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
Is c++ slower than c?
Name four predefined macros.
What is the difference between the functions rand(), random(), srand() and randomize()?
Why iomanip is used in c++?
What is the difference between global variables and local variable
Why is the function main() special?
Why is c++ so fast?
What is iterator c++?
What are 2 ways of exporting a function from a dll?
Write about the stack unwinding?
What data encapsulation is in c++?
What is the importance of mutable keyword?
Do the names of parameters have to agree in the prototype, definition, and call to the function?
What is a storage class used in c++?
Differentiate between C and C++.