what is a static function

Answer Posted / abdur rab

Static functions in C
======================
If API's are developed using C and there are few functions
which the user of the API need not know about them, make
that function as static. The static function in C is
visible only inside the file where in it is declared and
defined.

Static functions in C++
========================
Unlike other member function, a static function is always
stuck with its class rather than the instance. The other
memeber functions are stuck with their objects.

A static function can be accessed without creating an
instance, since it is available with the class itself.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is methods in c?

637


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

1887


Write programs for String Reversal & Palindrome check

594


Why & is used in scanf in c?

616


Can a variable be both static and volatile in c?

604






Do you know null pointer?

600


Explain what is wrong with this program statement?

616


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

1702


How can I sort more data than will fit in memory?

621


Why main is used in c?

583


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

1644


What are identifiers c?

560


What are the 5 elements of structure?

560


How do you list files in a directory?

559


Explain how can I convert a number to a string?

638