is c platform independent?as i think it is.but it is compiler dependend.my statement is right or wrong?
Yes C is platform independent. However, it doesn't mean you can run any code on any machine. It depends on the resources you've used in the code but generally speaking, yes its platform independent.
No C is not platform independent. Platform means Operating system + hardware and with the change of this combination you need different vendor specific programs to convert you c code into a machine executable code. So for windows you need a different program(compiler) but with Linux you need different compiler to convert your c code into machine executable code form. For each platform( operating system + hardware resources) you need different compiler programs to get executable code from c programs. That's why c is not platform independent
No Sir, C is platform dependent , i accept. But, Its difficult to say that "windows need different compiler than Linux to execute the program". If you check out most of released compilers, 90% are 'em are compatible to both. & The most popular one - GCC, GNU compiler is available for both Linux & Windows. There are many more compilers available, some are with IDEs & some not. Some Compilers are maintained regularly & some not. Maintained ones becomes popular & the out-of-date compilers become extinct. For list of compilers :: Click Here
How you're saying that C language is platform dependent? If you can make programs for Windows, Linux, AVR with same syntax and language constructs, using same compiler (GCC), then what is making it platform dependent? True that you cannot directly port a windows program to Linux, but that doesn't mean its platform dependent.
@sulochana anand No C language is not platform independent. I think following points will give u good picture: 1) If you have written a code on one platform, then u need to compile the same code on different platforms separately if want run your code on them. 2) Some internal library functions rely on the platform OS system calls and may not work the same way on all platforms. 3) Also C language behaves differently on different platforms, for example some architectures may follow different schemes for their data-path flow, different little/big endian terminology.
I think it is good discussable point that c is platform independent or not.I read in a book that c is portable.and portable means moovable.its true that on diffrent os it gives diffrent result but slightly diffrent.i think its platform independent.what u say?