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


Please Help Members By Posting Answers For Below Questions

what's the basic's in dot net

1730


What is polymorphism in oops with example?

518


Why is encapsulation used?

567


What is abstraction in oop with example?

631


Explain the advantages of inheritance.

660






What is a null tree?

615


Prepare me a program for the animation of train

1975


What is encapsulation with example?

568


hi all..i want to know oops concepts clearly can any1 explain??

1669


What is object in oop?

667


What is abstract class in oop?

522


How Do you Code Composition and Aggregation in C++ ?

24176


What is class and example?

557


How do you define social class?

592


What is polymorphism in oop example?

505