What is static function and static class?

Answer Posted / anthony michael

Static function and static variable does not below to single
instance of a class.

To access static functions we don't need instance of a class
instead it can be accessed using the class name followed by
::operator as:
[class_name::static_function() ]

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a literal in c++?

569


What is low level language in simple words?

565


What is the need of a destructor? Explain with the help of an example.

568


what kind of projects are suitable for c and c++

629


What is the best c++ ide?

606






What is c++ iterator?

647


Differentiate between realloc() and free().

595


How do you declare a set in c++?

536


How can you quickly find the number of elements stored in a dynamic array?

580


Is swift faster than c++?

565


How much is c++ certification?

589


What is setf in c++?

584


Define token in c++.

714


What are multiple inheritances (virtual inheritance)?

585


What do you mean by early binding?

601