what is a ststic variable and stiticfunction
briefly explain with exmple and in which case we use
Answer Posted / zubeir
Static variable is the one allocated statically, meaning
that, it is allocated once in the program space and exists
till the program space is deallocated (the close of the
application).
Note:- Some people get confused between stack allocation
and static allocaion. Both are different terms.
A static function is again the same concept with static
variable allocation, but here the allocation is not just a
variable but a function's 'activation frame'. The
activation frame, for now, consider the function's
information required by the compiler to execute the
function which is stored internally.
Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
Who invented oop?
what are the ways in which a constructors can be called?
What is abstract class in oop?
to find out the minimum of two integer number of two different classes using friend function
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What is oops and its features?
Can we create object of abstract class?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
Why is encapsulation used?
What is the renewal class?
What are two types of polymorphism?
What is object and example?
Why do we need polymorphism in c#?
What is the point of polymorphism?