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 |
Write a C program to print 1 2 3 ... 100 without using loops?
What is meant by global static? why we have to use static variable instead of Global variable
Tell me is null always defined as 0(zero)?
struct node { int *a; char *b; char array[12]; }; struct node m,*n; assign the value in *a,*b,char array[12]
What are the uses of pre-processor directives?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
18 Answers Acropolis, HCL, Intel, TCS,
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
what is the difference between char * const and const char *?
Can a file other than a .h file be included with #include?
Write a C/C++ program that connects to a MySQL server and checks intrusion attempts every 5 minutes. If an intrusion attempt is detected beep the internal speaker to alert the administrator. A high number of aborted connects to MySQL at a point in time may be used as a basis of an intrusion.
2 Answers Drona Solutions, Infosys, Vodafone, Webyog,