CoolInterview.com - World's Largest Collection of Interview Questions
Start Your Own website Now
Sponsored Links

Interview Questions
Our Services

Get 9,000 Interview Questions & Answers in an eBook.


  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!



    Send your Resume to 6000 Companies


  • INTERVIEW QUESTIONS C FUNCTIONS IN C DETAILS
    Question :
    What is a static function?
    Category Functions in C Interview Questions
    Rating (0.4) By 1292 users
    Added on 10/22/2004
    Views 14036
    Rate it!
    Answers:

    A static function is a function whose scope is limited to the current source file. Scope refers to the visibility of a function or variable. If the function or variable is visible outside of the current source file, it is said to have global, or external, scope. If the function or variable is not visible outside of the current source file, it is said to have local, or static, scope.



    All function bydefoult Static nature.



    Posted by: Prem Kumar    

    Contact Prem Kumar Contact Prem Kumar

    static function contain constant visibility in source code. means either local or global scope and that can't change after declare.



    Posted by: parshant tyagi    

    Contact parshant tyagi Contact parshant tyagi

    Static function only access static variables in c++, and the scope for present source file.



    Posted by: Sushil Shinde     

    Contact Sushil Shinde Contact Sushil Shinde

    Static member functions have a class scope and they do not have access to the 'this' pointer of the class. When a member is declared as static, a static member of class, it has only one data for the entire class even though there are many objects created for the class. The main usage of static function is when the programmer wants to have a function which is accessible even when the class is not instantiated.



    Posted by: DILIP PAWAR    

    Contact DILIP PAWAR Contact DILIP PAWAR

    static function is a function in which the scope of variables are limited to that function only..i.e the variables which are declared under static function can use only with in the function as locally.and the main adv of static function is there is no need to instantiate class.



    Posted by: satya    

    Contact satya Contact satya

    Static variables are those variables whose lifetime is till the execution of a program completes. default value is 0.

    static functions are those who visible to the other program.



    Posted by: vishal    

    Contact vishal Contact vishal

    Static makes the function/variable to have single memory location!.....



    Posted by: SaktHi    

    Contact SaktHi Contact SaktHi

    static functon are those function which are ued in limited area



    Posted by: varsha    

    Contact varsha Contact varsha

    static funcn means which called itself and dere is no need
    of object to call static funcn..
    static fun will use only static variables but not ordinary
    variables..



    Posted by: javed alam    

    Contact javed alam Contact javed alam

    Static member functions have a class scope and they do not have access to the 'this' pointer of the class. When a member is declared as static, a static member of class, it has only one data for the entire class even though there are many objects created for the class. The main usage of static function is when the programmer wants to have a function which is accessible even when the class is not instantiated.



    Posted by: Subhajit Giri    

    Contact Subhajit Giri Contact Subhajit Giri

    Static member functions have a class scope and they do not have access to the 'this' pointer of the class. When a member is declared as static, a static member of class, it has only one data for the entire class even though there are many objects created for the class. The main usage of static function is when the programmer wants to have a function which is accessible even when the class is not instantiated.



    Posted by: raghu    

    Contact raghu Contact raghu

    If you have the better answer, then send it to us. We will display your answer after the approval.
    Rules to Post Answers in CoolInterview.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

       
    Related Questions
    View Answer
    Is using exit() the same as using return?
    View Answer
    Differentiate between a linker and linkage?
    View Answer
    What is a function and built-in function?
    View Answer
    What is an argument ? differentiate between formal arguments and actual arguments?
    View Answer
    What is the purpose of main( ) function?
    View Answer
    What are the advantages of the functions?
    View Answer
    What is a method?
    View Answer


    Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

    View ALL Functions in C Interview Questions

    User Options
    Sponsored Links


    Copyright ©2003-2014 CoolInterview.com, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | C Interview Questions & Answers

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes


    Cache = 1.875 Seconds