This Question is not programming related but rather important for all compiler related programming languages especially the Language C.
what is portabily?
since my graduation i have been taught C is not 100 % portable language.
but i dint get any satisfactory answers for,not 100 % portable?
where its lagging and why can't we make it 100 % portable?
How a compiler generates the portable code for all the processors
Assembly language is considered as non portable language because the instruction are understandable only by the specific processor.
but how a compiler is able to generate code that is understandable by all the processors.
when i install a compiler i dont worry on what processor my system runs ( i only worry about OS, what OS does to compiler?)
again the OS may run on different processors.
but how a particular comipler is able to generate code that almost works on all processors with minor or few modifications.
i believe we can run Windows OS, Linix OS on Motorola as well as Intel or AMD or some other processors.
but how the same compiler is able to generate code for different processor.
thanks in advance.