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 |
What is main () in c language?
What is typedf?
What is n in c?
I have an array of 100 elements, each of which is a random integer. I want to know which of the elements: a) are multiples of 2 b) are multiples of 2 AND 5 c) have a remainder of 3 when divided by 7
What is the output of the following program #include<stdio.h> main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); }
main() { int a = 65; printf(“%d %o %x”,a,a,a); } Output 65 101 41 Please explain me.How it is coming like that?
main() { int i=5; printf("%d",++i + i); } output is 10 ------------------------ main() { int i=5; printf("%d",i++ + i); }output is 12 why it is so? give appropiate reason....
input may any number except 1,output will always 1.. conditions only one variable should be declare,don't use operators,expressions,array,structure
What is the use of gets and puts?
Explain how can you be sure that a program follows the ansi c standard?
How are portions of a program disabled in demo versions?
errors in computer programmes are called