What is the use of static functions?

Answer Posted / sumanta pattanayak

static function is used to call static variable or class
variable...rather than that without creating the class
object we can access the static function by
classname.staticfunctionname.....THIS cannot be used inside
static function.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between struct and class in terms of access modifier.

946


Is string data type in c++?

799


what is multi-threading in C++?

820


give me an example for testing a program showing the test path .show how the test is important and complex.

2667


Can create new c++ operators?

763


Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);

832


What is an inline function in c++?

859


Why we use #include iostream in c++?

773


Explain virtual destructor?

909


What c++ is used for?

834


What do you mean by static variables?

851


Explain pass by value and pass by reference.

799


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

807


What are protected members in c++?

869


What is c++ runtime?

837