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 |
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
How can this be legal c?
What oops means?
to get a line of text and count the number of vowels in it
How can you call a function, given its name as a string?
Differentiate b/w Modify and Update commands giving example.
What are shell structures used for?
Where can I get an ansi-compatible lint?
#include<stdio.h> main() { int a=1; int b=0; b=++a + ++a; printf("%d %d",a,b); }
How can I call a function with an argument list built up at run time?
what is volatile in c language?
9 Answers Cap Gemini, HCL, Honeywell, TCS, Tech Mahindra,
Explain what is the heap?