Recall & Review
beginner
What happens first when a function is called in Go?
The program jumps to the function's code and starts executing from the first line inside the function.
Click to reveal answer
beginner
What is the role of the return statement in a function?
It ends the function execution and optionally sends a value back to where the function was called.
Click to reveal answer
intermediate
How does Go handle multiple return values in a function?
Go functions can return multiple values by listing them in the function signature and the return statement.
Click to reveal answer
beginner
What happens if a function does not have a return statement?
If the function's return type is void (no return), it simply finishes execution and control goes back to the caller.
Click to reveal answer
intermediate
Explain the flow when a function calls another function inside it.
The first function pauses, the called function runs completely, then control returns to the first function to continue.
Click to reveal answer
What does the Go program do immediately after a function finishes executing?
✗ Incorrect
After a function finishes, the program returns to the exact place where the function was called to continue execution.
Which keyword is used to send a value back from a function in Go?
✗ Incorrect
The 'return' keyword ends the function and sends back the specified value(s).
If a function calls another function, what happens to the first function?
✗ Incorrect
The first function waits (pauses) until the called function completes before continuing.
Can a Go function return more than one value?
✗ Incorrect
Go supports multiple return values by specifying them in the function signature and return statement.
What happens if a function with no return type reaches the end of its code?
✗ Incorrect
Functions without return types simply finish execution and return control to the caller.
Describe the step-by-step flow when a Go function is called and then returns a value.
Think about what happens from the moment you call the function until you get the result.
You got /5 concepts.
Explain how Go handles a function that calls another function inside it.
Imagine you ask a friend to do something before you continue your task.
You got /4 concepts.