What is the usage of static function?

To access static members

This question is related to Wipro Interview

Showing Answers 1 - 2 of 2 Answers

bhoji_005

  • Oct 5th, 2007
 

If you write int i;
then i contain garbage value.
If you intilize with static int i;
Then i contain 0 by default

  Was this answer useful?  Yes

arunMkumar

  • May 29th, 2008
 

In oops Static functions let u to invoke it with out any object of a class , instead u have to use the class name to invoke it...
 
main()
{
  class_name::static_fn_name();
}
                               

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions