Question discussion

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

358869Medium DSSSB TGT Computer Science 0 replies 0 views
0
Which of the following statements is correct about function prototypes in C?
  • AFunction prototype provides the code of the function, which will be executed when called.
  • BFunction prototype provides the complete implementation of a function, including the return type, name, parameters, and statements that make up the function’s body.
  • 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.
  • DFunction prototypes are typically placed at the end of the code after the main function.
Correct answer: C

Explanation

A function prototype tells the compiler the function's return type and the number and types of its arguments. It does not contain the function body.

Discussion 0

Nobody has replied yet. Start the discussion!