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 |
print the following using nested for loop. 5 4 3 2 1 1 2 3 4 3 2 1 1 2 1 2 1 1 2 3 4 3 2 1 1 2 3 4 5
What is conio h in c?
program to find the magic square
i want to have a program to read a string and print the frequency of each character and it should work in turbo c
related proverb of "dont count your chicken before it hatches"
what is the function of void main()?
What are the difference between a free-standing and a hosted environment?
Write a c program to sort six numbers and find the largest one by using the ladder of if-else? plz do help me
What is the most efficient way to count the number of bits which are set in a value?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
2. What does static variable mean?
diff between exptected result and requirement?