difference between static and non-static variables?
Answer Posted / santosh mundhe
Static:1)Memory allocated before creation of object.
2)Gets memory on Global segment.
3)Object can't get copy of static variable, each
object shears static variable from global segment.
4)Static variables are not part ob object.
Non-static:
1)Gets memory on satck segment.
2)Object gets copy of non static variable.
3)Non static variables are part of object.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is destructor give example?
when to use 'mutable' keyword and when to use 'const cast' in c++
What does it mean when someone says I oop?
What is data binding in oops?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
What is the difference between a constructor and a destructor?
What is difference between multiple inheritance and multilevel inheritance?
State what is encapsulation and friend function?
What does and I oop and sksksk mean?
write string class as your own class in java without using any built-in function
What is object in oop with example?
What is oops and why we use oops?
What do you mean by Encapsulation?
Which is better struts or spring?
Why do we use polymorphism?