Re: C Interview Questions



Harald van D?k said:

Richard Heathfield wrote:
J. J. Farrell said:
Richard Heathfield wrote:
5. Which of the Following [functions] is not defined in string.h?

All of them, obviously.

Implementation specific, perhaps? Does anything prevent an
implementation defining them in the header if it chooses to?

I can find no licence in the Standard that allows it.

If there is no way for an otherwise strictly conforming program to tell
the difference, there doesn't have to be any explicit licence that
allows it.

Although I don't claim to have thought it through, I can't help wondering
about standard library functions that use static buffers. There may be a
way for strictly conforming programs to detect that, in two different
modules of the program, different static buffers are being used. (And yes,
okay, perhaps the library could be organised to get around this, by using
buffers with external linkage, but it's getting very messy.)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.