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 encapsulation in oops?
What is class and object with example?
What is polymorphism what are the different types of polymorphism?
What is the difference between a constructor and a destructor?
What are the two different types of polymorphism?
What is an advantage of polymorphism?
What is this pointer in oop?
Is oop better than procedural?
What is oops?what is its use in software engineering?
Why interface is used?
Why do we need oop?
write a program to find 2 power of a 5digit number with out using big int and exponent ?
Write a c++ program to display pass and fail for three student using static member function
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout<
What is overloading and its types?