what is a ststic variable and stiticfunction
briefly explain with exmple and in which case we use
Answer Posted / subhashish sen
When a variable is declared with static keyword,its called
as static variable,means it retains its value across
different function calls.Its basically used for counting no
of objects created for a class in C++ and its initialized to
0 by default.
When a function declared as static,its called as static
function.It can only operate on static variables.
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is inheritance and how many types of inheritance?
What is a class and object?
What is destructor give example?
Why do we use encapsulation in oops?
What is cohesion in oop?
How to hide the base class functionality in Inheritance?
Can a varargs method be overloaded?
What is interface? When and where is it used?
Is html an oop?
write a program to find 2^n+1 ?
What are the benefits of oop?
What is stream in oop?
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.
What is encapsulation in ict?
What is an advantage of polymorphism?