+ 2

What is the work of return function in C?

20th Feb 2018, 5:53 PM
Nirvikar Saini
Nirvikar Saini - avatar
4 Answers
+ 3
It returns values back to where the function was called.
20th Feb 2018, 5:54 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 3
https://www.sololearn.com/Course/CPlusPlus/ https://www.sololearn.com/Course/CSharp/ ^Read through any of the available C-based languages provided here. It's something you learn in the first chapter or two. For the most part, the concept holds true between most languages.
20th Feb 2018, 6:01 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
It has two uses: 1. It immediately returns back control to the previous function from where it was called 2. It is used to return values from functions eg In main() function, if you return 0, it tells the operating system that the program terminated normally.
21st Feb 2018, 2:53 AM
Harsh Kumar
Harsh Kumar - avatar
+ 1
Take a look at this... maybe it'll help you out: https://msdn.microsoft.com/en-us/library/sta56yeb.aspx
21st Feb 2018, 6:37 AM
vishal jamdagni
vishal jamdagni - avatar