Re: Interview question?
Tomás Ó hÉilidhe wrote:
> Kenny McCormack:
>
>
>> I've re-arranged your code a bit, to make it a bit more clc-compliant
>> (though no claim of full compliance is made - I'm sure the regs will
>> come up with something to nitpick). Note the missing include that
>> would have made your program UB.
>
> <snip code>
>
> Good stuff.
>
> As I'm sure you're already aware tho, you need angle brackets instead of
> inverted commas:
>
> #include <stdio.h>
With #include "stdio.h", if ./stdio.h cannot be found, it is treated as if
it were #include <stdio.h>, therefore including /usr/include/stdio.h (or
wherever the standard header is, and regardless of whether it's actually a
file).
--
Army1987 (Replace "NOSPAM" with "email")
|