Re: C Interview Questions
- From: Richard Heathfield <invalid@xxxxxxxxxxxxxxx>
- Date: Tue, 31 Oct 2006 06:41:43 +0000
J. J. Farrell said:
Richard Heathfield wrote:
2. When do you say that a digraph is acyclic
What has this to do with C?
C99 has digraphs, and I'd say they're always acyclic.
Bad dog! No biscuit! :-)
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. The most relevant
paragraph appears to be:
4.1.2 Standard headers
Each library function is declared in a header, /81/ whose contents
are made available by the #include preprocessing directive. The
header declares a set of related functions, plus any necessary types
and additional macros needed to facilitate their use. Each header
declares and defines only those identifiers listed in its associated
section. All external identifiers declared in any of the headers are
reserved, whether or not the associated header is included. All
external identifiers that begin with an underscore are reserved. All
other identifiers that begin with an underscore and either an
upper-case letter or another underscore are reserved. If the program
defines an external identifier with the same name as a reserved
external identifier, even in a semantically equivalent form, the
behavior is undefined./82/
It seems to me that this does not give permission for implementations to
define standard library functions in standard headers, although it does
mandate that they be declared therein.
--
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)
.
- Follow-Ups:
- Re: C Interview Questions
- From: Harald van Dijk
- Re: C Interview Questions
- References:
- C Interview Questions
- From: dhruvaraj
- Re: C Interview Questions
- From: Richard Heathfield
- Re: C Interview Questions
- From: J. J. Farrell
- C Interview Questions
- Prev by Date: Re: C Interview Questions
- Next by Date: Re: if clause
- Previous by thread: Re: C Interview Questions
- Next by thread: Re: C Interview Questions
- Index(es):
Relevant Pages
|
|