MCQ Single Best Answer Easy

QWhat is the purpose of a function prototype in C language?

ID: #7185 Function in C Language 145 views
Question Info
#7185Q ID
EasyDifficulty
Function in C LanguageTopic

Choose the Best Option

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

  • A To define the implementation of a function.
  • B To declare the return type of a function.
  • C To declare the function name and its parameter types.
  • D To declare the function name and its return type.
Correct Answer: Option C

Explanation

Answer: c. To declare the function name and its parameter types.

Explanation: A function prototype is a declaration of the function name and its parameter types, but not its implementation or return type. It allows the compiler to know about the function before it is called, so that it can perform type checking and generate appropriate code.

Share This Question

Challenge a friend or share with your study group.