- #1
fog37
- 1,568
- 108
Hello Forum,
I am trying to get clear on the return statement when defining functions in C. A function is a group of statements that together perform a certain task. A function usually receives some input arguments which it uses to produce some output arguments. In C, we must specify what type of data the output is going to be. Some functions can possibly have no input arguments and no output arguments. For example, void main(void) receives and outputs nothing...I guess it simply initiates the code that it contains which could possibly produce inputs and outputs...
In general, does the return statement represent/indicate the output of the function?
Thanks,
fog37
I am trying to get clear on the return statement when defining functions in C. A function is a group of statements that together perform a certain task. A function usually receives some input arguments which it uses to produce some output arguments. In C, we must specify what type of data the output is going to be. Some functions can possibly have no input arguments and no output arguments. For example, void main(void) receives and outputs nothing...I guess it simply initiates the code that it contains which could possibly produce inputs and outputs...
In general, does the return statement represent/indicate the output of the function?
Thanks,
fog37