7
QuizMultiple Choice

Resources for Programmers — Unit test

Question 7 • Introduction to Information Technology - EL3701

A function is different from a procedure because a function

Answer
A
does not contain a set of instructions.
B
can have only a limited number of steps.
C
returns a value.
D
is mathematical.

Explanation

A function performs a set of instructions and returns a value that can be used elsewhere in a program. A procedure can also perform instructions, but it does not necessarily return a value. Therefore, the correct choice is “returns a value.”

AI-written and checked against the verified answer.

Previous
Next