In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Today, I would like to share with you the relevant knowledge points about how to define internal and external functions in c language. the content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article, let's take a look at it.
Internal function and external function
A function is the smallest unit in a c language program, and one or more functions are often saved as a file, which is called a source file. Define a function that will be called by another function. However, when a source program is composed of multiple source files, you can specify that the function cannot be called by other files, so C language divides the function into two categories: one is internal function, the other is external function.
Internal function
Define a function, if this function can only be called by other functions in the source file, but not by other functions in the source file, this function is called internal function, also known as static function.
When defining internal functions, use the keyword static to modify
Static returns value type function name (parameter list)
Description:
1. The meaning of the static keyword does not refer to the storage mode, but means that the calling scope of the function is limited to this file, so the internal functions of the same name in different source files do not affect each other.
2. Internal functions are used in the same way as ordinary functions, except that they cannot be called by functions in other source files.
External function
An external function means that the function can be called by functions in other source files
Extern returns value type function name (parameter list)
For example:
Extern int add (int a, int b)
Description:
In C language, if the definition does not specify whether it is an internal function or an external function, the default is an external function, so extern can be omitted.
These are all the contents of the article "how to define internal and external functions in c language". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.