Use of static in functions

H

Halid Umar A M

Dear All,
Please help me to understand the use of static in a function.
What is the use of a function to be static in a module? For example in
a network applications there will be a common function to convert the
address to decimal dotted notation. It can be written as
static char *addr_to_dotted(unsigned long int addrp){ }

what is the use of static there? Please explain me.

Regards,
Halid Umar
 
R

Richard Bos

Halid Umar A M said:
Please help me to understand the use of static in a function.
What is the use of a function to be static in a module? For example in
a network applications there will be a common function to convert the
address to decimal dotted notation. It can be written as
static char *addr_to_dotted(unsigned long int addrp){ }

what is the use of static there? Please explain me.

Your teacher, or your textbook, should have explained this.

It means that that declaration will not be visible outside that
translation unit.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top