Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Write a c++ program to display pass and fail for three student using static member function

3326


What is destructor oops?

1035


What is the important feature of inheritance?

1070


What is encapsulation in oop?

988


Why oops is important?

1029


What is methods in oop?

926


Where You Can Use Interface in your Project

1835


What is encapsulation in oops?

958


Why multiple inheritance is not possible?

1018


What is constructor in oop?

1019


What is abstraction in oop with example?

1061


What is the difference between a mixin and inheritance?

935


write a program to find 2^n+1 ?

2017


Can abstract class have normal methods?

992


What is class encapsulation?

1030