Oxford, Cambridge and RSA (OCR) GCSE Computer Science Paper 2 Practice

Question: 1 / 400

What do you call a named value that cannot be altered during program execution?

Variable

Constant

A named value that cannot be altered during program execution is referred to as a constant. By definition, constants are fixed values that remain the same throughout the execution of a program, providing stability and reliability in situations where it’s essential that a value doesn’t change. For example, the value of π (pi) is often defined as a constant in programming since it represents a specific, unchanging mathematical value.

In contrast, variables are intended to store data that can change over time during program execution. Identifiers are simply names used to refer to variables, constants, functions, or other entities in a program; they don’t denote whether the value is changeable or not. Functions are blocks of code designed to perform specific tasks and can take parameters, return values, and can change the state of data as needed. Each of these options serves a distinct purpose in programming but does not represent a value that remains unchanged during execution as constants do.

Get further explanation with Examzify DeepDiveBeta

Identifier

Function

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy