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
What type of question are asked in GE code writing test based on c++ data structures and pointers?
Describe exception handling concept with an example?
What is command line arguments in C++? What are its uses? Where we have to use this?
When should we use container classes instead of arrays?
What is a block in c++?
the maximum length of a character constant can be a) 2 b) 1 c) 8
How new/delete differs from malloc()/free?
Why cstdlib is used in c++?
What are the extraction and insertion operators in c++? Explain with examples.
Explain function overloading and operator overloading.
Is c++ primer good for beginners?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
Differentiate between late binding and early binding. What are the advantages of early binding?
What is linked list in c++?
What is a driver program?