CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C DETAILS
Question :
What is a static function?
Category C Interview Questions
Rating (4.3) By 52 users
Added on 10/22/2004
Views 12514
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


If you have the better answer, then send it to us. We will display your answer after the approval.
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 it possible to execute code even after the program exits the main() function?
View Answer
Is using exit() the same as using return?
View Answer
Can the sizeof operator be used to tell the size of an array passed to a function?
View Answer
Is it better to use a pointer to navigate an array of values,or is it better to use a subscripted array name?
View Answer
What is the difference between a string and an array?
View Answer
What is a modulus operator? What are the restrictions of a modulus operator?
View Answer
Why n++ executes faster than n+1?
View Answer
Write the equivalent expression for x%8?
View Answer
Which expression always return true? Which always return false?
View Answer
What is storage class and what are storage variable ?
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/989/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.94