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 is different between oops and c++

2162


Which is not an object oriented programming language?

713


What is difference between oop and pop?

836


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1970


What are oops methods?

736


What is polymorphism and types?

806


What is the difference between procedural programming and oops?

751


Is react oop?

795


What is abstraction encapsulation?

844


What is constructor overloading in oop?

822


What is byval and byref? What are differences between them?

1921


can inline function declare in private part of class?

3940


What is destructor give example?

790


What is static modifier?

816


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1725