What does the keyword "static" mean?

Answer Posted / subhashish sen

static keyword is used with both variables and
functions.when a static variables means it retains its value
for different function calls and in C++ this variable is
used mainly for counting no. of objects of a class and it is
not confined to a particular object and for static member
functions its can only manipulate static variables and a
static member function can be invoked without an object of
class.

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between multiple inheritance and multilevel inheritance?

603


What is polymorphism what is it for and how is it used?

574


Can a varargs method be overloaded?

617


What is polymorphism and types?

600


Why do we use class?

633






Advantage and disadvantage of routing in telecom sector

786


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

1786


Why is encapsulation used?

577


Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

699


What is difference between inheritance and polymorphism?

571


What is solid in oops?

607


Where You Can Use Interface in your Project

1425


Why do we use polymorphism in oops?

579


What is the problem with multiple inheritance?

586


What is abstraction in oop with example?

644