Tuesday, 5 December 2017

Platform dependency of C language

Why C is platform dependent programming language?
All programming languages are platform independent, but the executable file which is being created after compiling the program is one of the main reason to become platform dependent.
Windows can only handle .exe files , similarly Mac can handle only .dmg files

Why the Compiler creates the executable file which can run in host operating system only?
C Compiler is platform dependent since it is closely linked to the OS kernel which is different for different OS.

Hope you have got the idea of platform dependency of C language.
Thank you..

No comments:

Post a Comment

C interview question 8

What will be the output of the given code? #include <stdio.h> int main(void) { float a = 3.14; printf("%f",a%3); ...