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

What is the renewal class?

0 Answers   Ebix, IBM,


WHY FUCTION OVERLOADING DOSENOT RETURN A RETEN TYPE

2 Answers  


How to execute business logic for only once ..?even though user clicks submit button multiple times by mistake..? (i disabled JavaScript)

1 Answers  


What is polymorphism what is it for and how is it used?

0 Answers  


Can you name some types of inheritance?

0 Answers   Motorola,






Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

0 Answers   CAT,


Iam doing my project on instant messaging , if you any new ideas regarding this project ,please suggest it?

2 Answers  


pointers are support in C#? if yes then how to use it?

8 Answers   Softvision Solution,


What is the highest level of cohesion?

0 Answers  


Program to open a file with First argument

1 Answers   TCS,


write a program which best describes polymorphism in real world?

2 Answers   CTS, Infosys, NexGen,


Write A Program using Single and Multiple Inheritance.

1 Answers  


Categories