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...

application of static variables in real time

Answer Posted / venugopal

ya.. well before going to know the static variable u need to know the diff b/w static and general variable.
in case of general variable every object have own memory.In case of static variabale all objects share the static data members.
so conclusion is:general members hv own memory so there is no relation b/w one object data to other object data .Static data it maintains relation

uses:
when we open some websites in the homepage we found "hits".It denotes how many users open this site so far.so the "hits" is a integer type we declare it as a static member when i try to open the site my browser acts as a one object and increment the hits value and other person open the site the same increment variable is accessed by other person. my id: venugopal.palavalasa@gmail.com

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is a null pointer different from a dangling pointer?

1085


Why isn't any of this standardized in c? Any real program has to do some of these things.

1266


Who invented b language?

1473


Are pointers really faster than arrays?

1081


What happens if a header file is included twice?

1076


What is data structure in c language?

1161


How are strings stored in c?

1079


please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com

1838


How can I read a binary data file properly?

1247


program for reversing a selected line word by word when multiple lines are given without using strrev

2536


How do you print only part of a string?

1069


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4333


Why c is a procedural language?

1129


What is header file in c?

1107


the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function

1369