CBSE Class 12 Computer Science Question 1 of 103

Working with Functions — Question 1

Back to all questions
1
Question

Question 1

Assertion. A function is a subprogram.

Reason. A function exists within a program and works within it when called.

Answer

(a)

Both Assertion and Reason are true and Reason is the correct explanation of Assertion.

Explanation
A function is a subprogram that acts on data and often returns a value. It is a self-contained unit of code that performs a specific task within a larger program. Functions are defined within a program and can be called upon to execute a specific set of instructions when needed.