Why I Love C

2018-11-30  本文已影响0人  RFSC

Why I Love C

  Note! I am not saying that other programing languages are not as good as C. Every Programming languages has its meaning and value, otherwise it is already dead or never born.

  C Programming Language was originally developed by Dennis Ritchie between 1969 and 1973 at Bell Labs, and used to re-implement the Unix operating system. This is a brief intruduction to C on Wikipedia. And C is my first computer language to learn. At winter holiday in 2014, I bored at home and browse the website. And the link Computer Language caused my attention, I clicked and I saw it, the C programming language. That's started of the story of me & C.

  At that time, I am just a high school student and I have no computer. So I install an app called c4droid for complie the C code and I print the first "Hello World!" in my life on my 500 RMB smart phone. I was happy at the time. I bought a book like "C xxx 0 to 1" to learn C and I find a lot of bugs in the book, haha ∩_∩. Everything is ok at the beginning, but as I learned, I became confused that I just can wrote console application and just implement some numeric problems (Yeah, I know, it's my fault, C is powerful -_-!). So I decide to learn other computer languages and I actually did it in the next two years (But not completely put down C) like C++, Python, Java, Html, Css, Js and so on. After learning these I found some advantages of C, simple, effective, powerful and flexible.

  And C has disadvantages too, like manually manage memory, null pointer and so on. But this all can be solved (you only need to be serious and serious =_=).

  Let the story continue. When I was learning Java, I saw, solve the array sorting problems using sort () just like:

        Array.sort (a);

  C has sorting function too, but I don't know at that time =_=.

        void qsort (void *base, size_t nmemb, size_t size,
            int (*compar)(const void *, const void *, void *));

  Ok, fine. I was very hard to write sorting algorithm (like shell sort, quick sort, etc) at that time is solved simpley O_O!.

  Oh, Sort, I knew it \ ∩_∩ /. This is first time I want to explore the function librarys. I have been using the C functions like printf, scanf, etc, and I don't know how it is implemented. So I read the source code and found a lot of C pointer. I don't know much about it. Then I learned assembly language (The first one to learn is 8086 asm) and knew pointer is just an address of memory and it is flexible (Now I like to use it ∩_∩ ).

                ---------
pointer --> 0x00|0x1122 |   Then:
                ---------       pointer = 0x00
            0x02|0x3344 |       *pointer = 0x2211
                ---------   Note:
            0x04|0x5566 |       This is little-endian
                ---------

  During this time, I found a lot of products written by C. And what attracts me the most is Linux a totally free operating system wirtten entirely by asm (bootloader and some optimization) and C (most of the system). Yeah, C is powerful system programming language (There is now a new system programming language called Rust, more safer than C. I don't know much about it. So, I won't discuss it here). And now I learning how to design an operating system and reading Linux 0.11 source code.

  The story is done. And I will list bellow who is more suitable to learning C even using C (just what I think):

  There is some resources about Programming, Linux, OS develop and some Binary hacks in my github. And welcome to visit and download.

  At last, attach a sentence that Linus said: Read the Fucking Source Code!!!

  All done. That's why I love C so much.

PS: 又又又,又要考英语四级了,写篇文章压压惊 o_o! (有任何语法错误,或者拼写错误,还请指出,谢谢!)

上一篇下一篇

猜你喜欢

热点阅读