Why static Function is used in C++?

Answer Posted / rafiuddin

static functions can be called with out the class object
also. we can call static functions with scope resulation
operator.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4473


when to use 'mutable' keyword and when to use 'const cast' in c++

1881


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1702


What is encapsulation c#?

807


Why is polymorphism needed?

788


How do you achieve polymorphism?

818


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1973


What are the benefits of interface?

800


What is encapsulation selenium?

753


what are the realtime excercises in C++?

2545


What is interface in oop?

872


What is abstraction with example?

825


What is class in oop with example?

831


can we make game by using c

3716


What is abstraction in oop with example?

854