Finals questions! Need help asap

So for my final we are being given a list of questions, and of the 20 questions 5 will appear on the test. My best bet is to answer all of them just to be safe. I am having trouble with this question and I was curious if I could get some help.

3. Describe how a function call works from the initial call to the return, including the interactions between the operating system and the program.

this is what I have so far for my answer

A function call transfers control to the first statement in the body of the called function. When the final statement of the called function is executed, control is passed to he point following the function call.

I don't know what the initial call is, or rather I can't remember and I don't know their interactions with the OS.

Please help!! thank you!
I don't know if I fully understand functions myself either.

I think how a function call works is a sequence of code is "run" whenever the function is called. If a function has void parameters no data is required for the sequence of code to perform it's operations, otherwise a specific type (or types) of data must be passed to the function for it to properly run the code. The code of the function interacts in the same way as other code in the program, the compiler changes it into machine language that can be read by the specific operating system the computer is using. Upon completion of the code sequence, if a function is of a void data type no parameters are returned, otherwise a value is returned of the same data type as the function.

That's how I think a function works but not sure. I bet somebody will come in here and set me straight lol.
Last edited on
Topic archived. No new replies allowed.