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
what is the significance of static storage class specifier?
What is the use of function overloading in C?
explain what are pointers?
Can we access the array using a pointer in c language?
Why is sprintf unsafe?
Tell me about low level programming languages.
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
What does the characters “r” and “w” mean when writing programs that will make use of files?
What is the difference between array_name and &array_name?
How many bytes are occupied by near, far and huge pointers (dos)?
Which is the best website to learn c programming?
State two uses of pointers in C?
What is a structural principle?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
Write a C program to count the number of email on text