the word header as far as I know is usually in reference to a header file while the word signature is in reference to the arguments and return type of the function. For example, in my experience this would be called a signature:
int ptInPoly(Point q, Point p[], int n)
My professor is calling this a header in my assignments. I have found this confusing and would like to know if this different use terminology is common or something that only he does. Thanks
Here is some more context around the use of the term header:
"Your program must have a function with header: int ptInPoly(Point q, Point p[], int n) that determines if point q is in the polygon given in p"
The correct term is function declaration. When the parameter types are spelled out explicitly, as in your case int ptInPoly(Point q, Point p[], int n); it can also be called a function prototype. (Non-prototype format is considered very bad practice and rarely used nowadays.) A function prototype is a function declaration.
Function declaration and function prototype are formal terms used by the C standard.
The meaning of header is indeed a header file, with .h as extension. The C standard uses the term header to describe header files.
So your professor is using the wrong terminology.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With