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
Why is polymorphism used?
What is inheritance in oop?
What is methods in oop?
What is class in oop with example?
What is and I oop mean?
What is protected in oop?
Why it is called runtime polymorphism?
What is an interface in oop?
What are the components of marker interface?
What is abstract class in oops?
Is enum a class?
What is the use of oops?
What are constructors in oop?
What is the difference between abstraction and polymorphism?
Why do while loop is used?