4
AssignmentMultiple Choice

Functions, Procedures, Arguments and Parameters

Question 4 • FL-8207310-Digital Information Technology B

How is a procedure different than a function?

Answer
A
A function is a subroutine, while a procedure is a parameter.
B
A procedure and a function are the same thing.
C
A procedure returns a value, while a function does not.
D
A procedure does not return a value, while a function does.

Explanation

A function produces and returns a value that can be used in an expression, such as returning the result of a calculation. A procedure performs a task but does not return a value. Therefore, the correct choice is “A procedure does not return a value, while a function does.”

AI-written and checked against the verified answer.

Previous
Next