Joke Collection Website - Public benefit messages - Why do some functions in C language need to have return values? What is the return value?
Why do some functions in C language need to have return values? What is the return value?
The return value is for the convenience of calling from the function and returning the value to the calling function.
Because this function can also be realized with the parameter pointer, it can actually be realized that any function has no return value (completely passed by the parameter).
But many times,
The return value is easier to write than the way parameters are returned.
For example, if the return value is used to determine whether the function is executed correctly.
Then you can.
if(func()) ...
Write directly.
If you use parameters, you must write two sentences.
int a;
func(& amp; a);
If (a) ...
Therefore, the return value is not necessary, just for convenience.
- Previous article:Where is the 6-digit verification code of fluorite cloud?
- Next article:Sql grouping shows the top 5
- Related articles
- Why did a boy always call you back in seconds before, but he hasn't called you back after an hour today? Is he busy at work?
- Jiayuan Android Download Jiayuan Android.
- What time does Beijing Aerospace Museum release tickets every day?
- What is the interception of Taobao verification code?
- Received a Russian text message at the border.
- Send short messages by VoIP. The results need to be sent to a mobile phone number before sending. After the transfer. What's going on
- How to send regular short messages with OPPO R9?
- Will the merchant have logistics information after the express delivery is rejected?
- How to track customers?
- What should you say to your college son on his 20th birthday?