what is difference between static and non-static variables
Answer Posted / achal ubbott
The above answers are correct. A local static variable is
stored in heap. But a local variable is stored onto stack.
A Global variable made static can't be accessed from a
function outside the file using extern. So it limits the
scope.
Is This Answer Correct ? | 2 Yes | 10 No |
Post New Answer View All Answers
int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}
What is this pointer in c++?
What is binary object model?
Is c++ primer good for beginners?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
Evaulate: 22%5 a) 2 b) 4 c) 0
What is functions syntax in c++?
Which bit wise operator is suitable for checking whether a particular bit is on or off?
Can we get the value of ios format flags?
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
What is the protected keyword used for?
What does flush do?
Describe linkages and types of linkages?
Can constructor be private in c++?
Which programming language is best to learn first?