Programming tools Computer programming Question #19963
Single Choice Easy

QWhat is the primary purpose of the "return" statement in a function?

ID: #19963 Computer programming 110 views
Question Info
#19963Q ID
EasyDifficulty
Computer programmingTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Print Output
  • B Declare Variables
  • C End the Program
  • D Provide a Result
Correct Answer

Explanation

The "return" statement in a function is used to provide a result or value back to the calling code. It marks the end of the function's execution and returns a value to the calling context.

Share This Question

Challenge a friend or share with your study group.