Difficulty: Easy
Correct Answer: Declaring
Explanation:
Introduction / Context:A function prototype communicates a function's name, return type, and parameter types to the compiler before the function is used. This is critical for type checking, overload resolution (C++), and correct code generation. The question asks at which stage we provide that prototype in normal C/C++ development flow.
Given Data / Assumptions:
Concept / Approach:
Step-by-Step Solution:
Identify what a prototype contains: return type + name + parameter types.Recognize that providing this information is exactly a function declaration, not a definition.Therefore, the stage is Declaring.Verification / Alternative check:
Example: 'int sum(int a, int b);' (declaration/prototype) can appear in a header; the body appears in a source file.Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
Declaring
Discussion & Comments