Multiple choice

What is the difference between a function and a procedure?

  1. Function doesn't return a value, procedure returns a value

  2. Both return a value both are sub programs

  3. Procedure doesn't return a value, function returns a value

  4. Procedure allows the use of recursion

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In procedural programming, a function is designed to return a value to the caller, while a procedure performs a task without returning a value.