application of static variables in real time
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 |
Explain what is the difference between far and near ?
How to set a variable in the environment list?
what is the other ways to find a logic to print whether a number is an even or odd wit out using % symbol??????? i know three different ways to print it. so i need any other different logic>>>>>
How do we swap or interchange any 2 numbers without using Temporary variable...Anybody can pls answer it.. Thanks in Advance
what is data structure
Explain About fork()?
What is #include stdio h?
Define function ?Explain about arguments?
2 Answers Geometric Software, Infosys,
Using which language Test cases are added in .ptu file of RTRT unit testing???
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
How do you prevent buffer overflows in C?
f(char *p) { p=(char *)malloc(sizeof(6)); strcpy(p,"HELLO"); } main() { char *p="BYE"; f(p) printf("%s",p); } what is the output?
9 Answers Hughes, Tech Mahindra,