Q:

WHAT IS EXTERN AND STATIC FUNCTION IN C?

0

WHAT IS EXTERN AND STATIC FUNCTION IN C?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

By default, any function that is defined in a C file is extern. These functions can be used in any other source file of the same project which has many other files.

When we declare/define a function as static, these functions can’t be used in other files of the same project.

Also, if we want to use the same function name in different files of the same project, we can use static function which won’t through any compilation error for duplicate function name.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now