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
Write a c++ program to display pass and fail for three student using static member function
What is destructor oops?
What is the important feature of inheritance?
What is encapsulation in oop?
Why oops is important?
What is methods in oop?
Where You Can Use Interface in your Project
What is encapsulation in oops?
Why multiple inheritance is not possible?
What is constructor in oop?
What is abstraction in oop with example?
What is the difference between a mixin and inheritance?
write a program to find 2^n+1 ?
Can abstract class have normal methods?
What is class encapsulation?