Rev Up for Success with the 2025 OCR GCSE Computer Science Paper 2 Practice Extravaganza!

Question: 1 / 400

What do you call a subprogram that takes parameters and returns a value?

Procedure

Function

A subprogram that takes parameters and returns a value is called a function. Functions are designed to perform specific tasks and can be called multiple times within a program, allowing for code reusability and organization. When a function is invoked, it can receive input values (parameters), execute its internal code, and then provide an output value (the return value). This characteristic of returning a value distinguishes functions from procedures, which may not return any value even though they can also accept parameters.

In programming, a method typically refers to a function that is associated with an object in object-oriented programming, while a variable is simply a storage location that holds data. Therefore, the term function most accurately describes the concept of a subprogram that takes parameters and returns a result.

Get further explanation with Examzify DeepDiveBeta

Method

Variable

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy