The function of the fun function in C language is to be called by the main function to define a function or method, so that it can be expressed as fun when referenced, such as [int fun (int x, int y)].
The function of the fun function in C language is:
In C language, the fun function is usually called by the main function . It refers to using fun to define a function (or method), so that it can be expressed as fun when referencing. For example, int fun(int x,int y), void fun(char* a, char* b) and so on.
If you have a previous definition, you can call it in the main function, such as ans=fun(3,7); or fun(p1,p2);
The fun function is a custom function . The word fun has no other meaning except that it is used to represent the function when it is called.
Example 1:
Example 2:
Extended information:
Notes on using the fun function:
There is no fun function in the C language standard library. The fun function is a custom function that is used for examples or syntax demonstrations. It needs to be defined and declared by itself before use. The word fun has no special meaning and can also be replaced by another name, such as "abc" or "baidubaike".
It only means referencing the function that appeared before to call it to perform some requirements. int fun (int x, int y) is just an example of a function name, as well as its declared parameter type.
Related learning recommendations: C video tutorial
The above is the detailed content of What is the function of fun function in c language. For more information, please follow other related articles on the PHP Chinese website!