4
AssignmentMultiple Choice

Variables and Data Types

Question 4 • Introduction to Information Technology - EL3701

What is a return statement used for?

Answer
A
beginning a function
B
repeating a value
C
copying a function
D
exiting a function

Explanation

A return statement ends the current function and sends control back to the code that called it. It can also provide a value to that code, but its role is not to repeat a value or copy a function. So the correct choice is exiting a function.

AI-written and checked against the verified answer.

Previous
Next