what is a ststic variable and stiticfunction
briefly explain with exmple and in which case we use
Answer Posted / zubeir
Static variable is the one allocated statically, meaning
that, it is allocated once in the program space and exists
till the program space is deallocated (the close of the
application).
Note:- Some people get confused between stack allocation
and static allocaion. Both are different terms.
A static function is again the same concept with static
variable allocation, but here the allocation is not just a
variable but a function's 'activation frame'. The
activation frame, for now, consider the function's
information required by the compiler to execute the
function which is stored internally.
Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
What is the difference between procedural programming and oops?
How do you achieve polymorphism?
What type of loop is a for loop?
What is property in oops?
Why is object oriented programming so hard?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
c++ program to swap the objects of two different classes
What is multilevel inheritance in oop?
What is basic concept of oop?
Where is pseudocode used?
write a programe to calculate the simple intrest and compund intrest using by function overlading
How many human genes are polymorphic?
Why do we use oops?
What are the important components of cohesion?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.