구글와이드(336x280)_상단 2개


Why Learn C? C/C++/C#

C Programming/Why learn C?

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search
| History →

[edit] Why Learn C?

C is the most commonly used programming language for writing operating systems. Unix was the first operating system written in C. Later Microsoft Windows, Mac OS X, and GNU/Linux were all written in C. Operating systems run directly on top of the hardware -- there is no lower layer to mediate their requests with the except of the C compiler, which is assembly language.
Not only is C the language of operating systems, it is the precursor and inspiration for almost all of the most popular high-level languages available today. In fact, Perl, PHP, Python, and Ruby are all written in C!
By way of analogy, let's say that you were going to be learning Spanish, Italian, French, or English. Do you think knowing Latin would be helpful? In the same way, knowing C will enable you to understand and appreciate an entire family of programming languages built upon the traditions of C. Knowledge of C enables freedom.

[edit] Why C, and not assembly language?

Because Assembly language, while extremely powerful, is simply too difficult to program large applications, and hard to read or interpret in a logical way. Assembly language can be directly converted into binary with no compilation, assembly is instead 'linked' together, meaning the individual source files are all put into one file and converted to binary. C also gives the programmer the ability to program in assembly right inside the C-code, giving programmers the option to optimize a very important or heavily used piece of code in Assembly.

[edit] Why C, and not Java or Basic or Perl?

Mostly because of memory allocation. Unlike most computer languages, C allows the programmer to address memory the way he/she would using assembly language. Languages like Java and Perl shield the programmer from having to worry about memory allocation and pointers. This is usually a good thing. It's quite tedious to deal with memory allocation when building a high-level program like a quarterly income statement report. However, when dealing with low level code such as that part of the OS that moves the string of bytes that makes up that quarterly income report from the computer's memory to the network card's buffer so they can be shipped to the network printer, direct access to memory is critical -- something you just can't do with Java. C can be compiled into fast and efficient machine code.
So is it any wonder that C is such a popular language?
Like toppling dominoes, the next generation of programs follows the trend of its ancestors. Operating systems designed in C always have system libraries designed in C. Those system libraries are in turn used to create higher-level libraries (like OpenGL, or GTK), and the designers of those libraries often decide to use the language the system libraries used. Application developers use the higher-level libraries to design word processors, games, media players, and the like. Many of them will choose to program in the language that higher-level library uses. And the pattern continues on and on and on...

null



바보들의 영문법 카페(클릭!!)

오늘의 메모....

시사평론-정론직필 다음 카페
http://cafe.daum.net/sisa-1

바보들의 영문법 다음 카페
http://cafe.daum.net/babo-edu/

티스토리 내 블로그
http://earthly.tistory.com/

내 블로그에 있는 모든 글들과 자료에 대한 펌과 링크는 무제한 허용됩니다.
(단, 내 블로그에 덧글쓰기가 차단된 자들에게는 펌, 트랙백, 핑백 등이 일체 허용되지 않음.)

그리고 내 블로그 최근글 목록을 제목별로 보시려면....
바로 아래에 있는 이전글 목록의 최근달을 클릭하시면 됩니다.
그러면 제목을 보고 편하게 글을 골라 보실 수 있습니다.

그리고 내 블로그내 글을 검색하시려면 아래 검색버튼을 이용하시면 됩니다.


가가챗창

flag_Visitors

free counters