Why static Function is used in C++?

Answers were Sorted based on User's Feedback



Why static Function is used in C++?..

Answer / sujai cn

Static functions are used to perform the tasks which are
independent of the state of object or to perform class wide
functions ex. to count the number of instaces (objects) are
there in existence.

Is This Answer Correct ?    14 Yes 1 No

Why static Function is used in C++?..

Answer / 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

Why static Function is used in C++?..

Answer / mugdha taru

Because it is the only function which is accessible even
when class is not instantiateed

Is This Answer Correct ?    6 Yes 3 No

Why static Function is used in C++?..

Answer / mugdha taru

Because it is the only function which is accessible even
when class is not instantiateed

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More OOPS Interview Questions

in the following, A D B G E C F Each of the seven digits from 0,1,2,3,4,5,6,7,8,9 is: a)Represented by a different letter in abov fig: b)Positioned in the fig abov so tht A*B*C,B*G*E,D*E*F are equal. wch does g represents? C

1 Answers   IonIdea,


Why it is called runtime polymorphism?

0 Answers  


How to hide the base class functionality in Inheritance?

0 Answers   Viscus Infotech,


Why is static class not inherited?

0 Answers  


Prepare me a program for the animation of train

0 Answers  






tell about copy constructor

3 Answers   Siemens,


write a short note on Overloading of Binary Operator?

2 Answers  


Why we are use # in begning of programme of c++.

2 Answers   Syntel,


me get an assignent n its question is this 1.creat a set as in math i.ea={1,2} 2.insert element in it3. delete element don,t repeat any element 4.union 5. intersection of two sets plz help me i always pray for u n send me at ayeshawzd@hotmail.com f u have c++ how to program 5th addition then it is the 10.9 question in 10th chapter exercise

1 Answers  


What is a friend function & its advantage?

2 Answers   TCS,


What are the access specifiers avaible in c++?

4 Answers  


What is advantage of inheritance?

0 Answers  


Categories