In the context of programming, what does Return do?

552 views

I’m trying to pick up computer programming yet again, and I’m not really understanding the use of Return. What is it? How would you use it?

In: Technology

5 Answers

Anonymous 0 Comments

In C, the value after the RETURN command what that function returns to the calling routine.

For example if you declared an int some_function(int a,b), then the function is supposed to return an integer value to the calling routine. Somewhere in the some_function, the return statement will assign this value.

EDIT: RETURN doesn’t end or exit the function. It simply assigns a return value.

You are viewing 1 out of 5 answers, click here to view all answers.