"Richard Heathfield" <rj*@see.sig.invalidwrote in message
news:c7*********************@bt.com...
Walter Roberson said:
>In article <BL*********************@bt.com>,
Richard Heathfield <rj*@see.sig.invalidwrote:
>>>raghu said:
>>>Can anyone please tell me what are the different segments in a C
program?
>>>The term is not used within the C language specification. We have
functions, if that's any help to you.
I note the local man pages use the term in at least one place:
strspn (or strcspn) returns the length of the initial segment of
string s1 which consists entirely of characters from (not from)
string s2.
I don't have my Standard available to check the official wording.
I am guilty of jumping to a conclusion. The Standard does indeed use the
term 'segment' in the docs for strcspn and strspn, to refer to the first
part of a string.
Ah ... actually, you were right the first time. The term as the OP intended
is not really used.
It depends on whether you interpret "term" to be (the literal word) or (a
particular meaning of a word that can have several meanings). In this case
I'd support the second definition.
The OP intended "segment" as used in linker documentation or machine
architecture, things like ".data", ".bss", etc.
"segment" as cited above means "contiguous portion" or "subset" ... somewhat
different than the linker meaning.
If the specification includes an appendix on human parasitic infections and
they mention "segment" of a tapeworm, would it be fair to say that a
"segment" when talking about a tapeworm is different than a "segment" when
talking about a linker map? ... I kind of think they are different.