Question 65Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 2 (1:00 PM)

Which of the following statements is correct about function prototypes in C?

  1. AFunction prototype provides the code of the function, which will be executed when called.
  2. BFunction prototype provides the complete implementation of a function, including the return type, name, parameters, and statements that make up the function’s body.
  3. CFunction prototypes tell the compiler the number and type of arguments that are to be passed to the function and the type of value that is to be returned by the function.
  4. DFunction prototypes are typically placed at the end of the code after the main function.
Show answerHide answer

Correct answer: (C) Function prototypes tell the compiler the number and type of arguments that are to be passed to the function and the type of value that is to be returned by the function.

Explanation

A prototype declares the function's return type, name and the number and types of its parameters (ending with a semicolon), so the compiler can check calls. It has no body and is usually placed before main.

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 2 (1:00 PM)

This is question 65 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 2 (1:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.