Ok, I did a google, an altavista, a yahoo and god knows what else, but
no link was satisfactory. So can please someone tell what a "hosted"
and a "freestanding" C implementation is, and whats the difference
between these two? And what defines which is what?
Despite what several others have posted, and inferences one might draw
from the "hosted" name used, the differences between hosted and
freestanding environments has nothing at all to do with an operating
system.
A hosted implementation must be able to successfully translate and
execute every strictly conforming program, which means among other
things that it must provide at least the minimum required
functionality for every single standard library function. Note many
such functions, such as malloc() or fopen(), are allowed to always
fail, if they return the proper indication for failure.
Normally hosted implementations are associated with desk-top and
larger systems that do have operating systems, but there is nothing in
the standard that prevents an implementation's run-time support and
library from providing all required functionality directly on top of
bare hardware.
Also note that there are many operating system/C implementation
combinations that do not provide the entire standard library and thus
are freestanding implementations as defined by the standard despite
the presence of an operating system.