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.

Method

Variable

Want more questions?

All options are one-time payments.

$25.99

30 day pass for new members

All the basics to get you started

  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 30 day premium pass access
$59.99$171.99 usd

6 month DELUXE pass (most popular)

Full access FOR 6 MONTHS! & the ultimate digital PDF study guide (BONUS)

  • $171.99 usd value for $59.99! You save $106!
  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 6 months of full access
  • Ultimate digital PDF study guide included
  • Priority support
$15.99 $24.99

Ultimate digital PDF study guide

For those that prefer a more traditional form of learning

  • Available for instant download
  • Available offline
  • Hundreds of practice multiple choice questions
  • Comprehensive content
  • Detailed explanations
Image Description
Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy