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 methods in oop?

638


What is difference between data abstraction and encapsulation?

709


Why interface is used?

642


write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

1868


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

1731






what are the realtime excercises in C++?

2431


Can an interface inherit a class?

646


What is abstraction example?

699


Can we have inheritance without polymorphism?

704


What is the types of inheritance?

685


What is variable example?

672


Why is polymorphism used?

672


what type of question are asked in thoughtworks pair programming round ?

1848


c++ program to swap the objects of two different classes

1904


• What are the desirable attributes for memory managment?

1825