why do we use C?
C has been used successfully for every type of programming problem imaginable from operating systems to spreadsheets to expert systems – and efficient compilers are available for machines ranging in power from the Apple Macintosh to the Cray supercomputers. The largest measure of C’s success seems to be based on purely practical considerations:
- It was (and still is in some circumstances) the language of choice in Operating System Development (including all of Unix).
- It allows you direct control over the very low level aspects of the computer.
- Many legacy programs are written in C.
- Most of the things you learn with C will be directly transferable to future programming languages.
- Programs that are created with C run very quickly.
- C has a syntax (and some semantics) very close to Matlab, making the transition easy (okay, easier…).
- The programs you create in C will run “standalone”. All of the programs we wrote in Matlab, need Matlab in order to work, and if you don’t have access to Matlab, you are out of luck. C programs, once compiled into “executables”, can be transferred to other (similar) machines, and run without the need for the source code.
Many of the codes you will use in your future work/studies will have been written in C. You should at the least, be able to read them. And hopefully, you will be able to maintain, modify, and update them.