In c programming language, When the compiler compiles a program, the obj file is created. When that object file is run, an .exe file is generated.
That .exe file contains the machine language instructions that are understandable by the underlying processor.
If we run that .exe file on another kind of processor [say processor x], that processor will not understand that machine language instruction.
But if we compile that source code again in that processor, will the compiler produce the machine language instruction that is understandable by that processor?
I mean platform dependent problem will occur only when we want to distribute .exe file?
There will not be problem if we get the whole source code (.c) file?
In Java programming, the compiler produces .class file. That file includes the byte codes that are understandable by JVM.
If we want to contribute our s/w, but not the source code [like .exe file in c], we can distribute .class file?
We can execute that .class file on any processor. But we can not read the source code of that?
That is right?