In article <d2**********@nntp1.jpl.nasa.gov>,
E. Robert Tisdale <E.**************@jpl.nasa.gov> wrote:
Prakash T. wrote:
Mention the type of applications
which can be developed using C language?
Any application that can run on modern digital computers
as long as there is a C compiler for the target computer.
That's a close approximation, but not completely true -- at least
not without using undefined behaviour or compiler extensions.
Modern digital computers can have operations which are not part
of the C language, and which are not representable in C.
For example, if you have memory-mapped I/O (which is common),
then you need the ability to convert numeric addresses into C
pointers in order to perform the I/O. Now, for files that can
be hidden in the implimentation of the C f*() routines such
as fopen() and fwrite(), but anything beyond pure files (such as
serial ports or graphics) is beyond the scope of fopen(),
so even if the graphics can be responsably be handled via
fopen()/fwrite() [rather than, e.g., being a video page written
to directly] then one is getting into Undefined Behaviou.
The same thing happens if you have special I/O instructions instead
of memory-mapped I/O: you are only within the boundaries of the C
standard when the library routines are talking to file subsystems.
Thus, what can be implimented in *standard* C with no extensions
is in actuality only a subset of what can be "run" on
"modern digital computers". Roughly speaking, *standard* C
corresponds [at most] to that which is "Turing computable".
The problem with that is, as a friend of mine explored in depth
in his PhD thesis, that the majority of computers do not "compute"
particular results within the traditional meaning of Turing machines.
What, for example, is a toaster "computing" ? Considering
differences in moisture content and Brownian motion of air currents,
and differences in thickness and slize of slices, a toaster isn't
likely to get the same "inputs" twice in a row.
--
Entropy is the logarithm of probability -- Boltzmann