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
Is c call by value?
What are header files? What are their uses?
What are the Advantages of using macro
What are the types of pointers?
how is the examination pattern?
What is a program flowchart?
i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me
I need testPalindrome and removeSpace
#include
Explain what is the benefit of using const for declaring constants?
Why is main function so important?
Write a program to check palindrome number in c programming?
When should the const modifier be used?
What's a good way to check for "close enough" floating-point equality?
What do you mean by command line argument?
How does #define work?