B
BGB
Incorrect.
A prototype is just a function declaration that specifies the types of
the arguments. A non-prototype declaration always declares (perhaps
implicitly in C90, but still unambiguously) the return type.
This is not a prototype:
float func();
but it does declare that the return type is float.
In C90, if you call a function with no declaration at all (prototype or
otherwise), the compiler will assume that it returns an int -- but in
C99 that's a constraint violation.
yeah, I meant this case, where the function is just called with nothing
declaring it is in scope...
if the return type is not int (say it is a float or double, or a pointer
on some systems), then one gets a mangled or garbage return value, which
isn't so good.
MSVC defaults to assuming that any non-visible function returns int, so
it follows C90 rules by default...
also, last I checked it doesn't allow mixed statements and declarations
(all declarations needing to be at the start of the block).
but, it does have long long and '//' at least...