Thursday 5 December 2013

Why C , C++ Languages are platform dependent? Why C Programming can't execute Different Operating System?

Because the compiled code contains machine language whose format only understandable by current operating system in which we compile.
That means if we compile in windows Operating System ,we can execute it in any higher version of windows Operating System but not in different Operating System either in Linux/Solaris.

Below Diagram shows Clear Explanation:

Click on image for zoom

Conclusion :

  • From the above diagram we can say C-compiler software is different from Operating System,because it has to generate machine language separately specific to Operating System.  
  • Since C Software means Compiler +  Linker + header Files
  • C Software is also platform dependent.as compiler is dependent.hence one OS C Software will not work in another OS.

1 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More