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

design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6153


What is oops and its features?

589


which feature are not hold visual basic of oop?

1725


What is polymorphism give a real life example?

561


What is the real life example of polymorphism?

609






Can we create object of abstract class?

577


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1147


What does and I oop mean in text?

625


What are benefits of oop?

639


Can enum be null?

587


Can bst contain duplicates?

670


What are the data types in oop?

608


What is overriding in oop?

550


write a C++ program for booking using constructor and destructor.

2051


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.

1541