C語(yǔ)言簡(jiǎn)介
- C is a programming language that lets us give a computer very specifio commands.
- C語(yǔ)言是一種編程語(yǔ)言舆逃,它讓我們可以給計(jì)算機(jī)非常特殊的命令。
- C was invented in 1972. It's one of the oldest languages to be used even today !
- C是在1972年發(fā)明的疟丙。它是至今仍在使用的最古老的語(yǔ)言之一!
- It is one of the **most widely used **programming languages in the world.
- 它是世界上使用最廣泛的編程語(yǔ)言之一颖侄。
- It has influenced many popular languages, especially C++.
- 它影響了許多流行的語(yǔ)言鸟雏,尤其是c++享郊。
- But why do we still use such an old programming language?
- 但為什么我們還在使用這么古老的編程語(yǔ)言呢?
- Why not something newer and easier to understand, like Python?c++
- 為什么不使用一些更新的、更容易理解的東西孝鹊,比如Python呢?
- let's find out !
- 讓我們找出答案炊琉。
C語(yǔ)言特點(diǎn)
C特點(diǎn)一:簡(jiǎn)單
Simple: C is a Structure based language i.e we can divide a big program into multiple parts, which makes it easy to write and understand.
簡(jiǎn)單:C是一種基于結(jié)構(gòu)的語(yǔ)言。我們可以把一個(gè)大程序分成多個(gè)部分,這使它易于編寫和理解苔咪。
C特點(diǎn)二:高效锰悼、快速
-
Efficient and Fast 高效团赏、快速
- Programs written in C are efficient and fast.
- 用C寫的程序效率高箕般,速度快。
- This is the most critical factor for usinq C over other lanquages.
- 這是用C而不是其他語(yǔ)言最關(guān)鍵的因素舔清。
- C is considered to be "close to the computer," meaning we can program the computer to do precisely what we want.
- C被認(rèn)為是“接近計(jì)算機(jī)”的丝里,這意味著我們可以對(duì)計(jì)算機(jī)編程,使其精確地做我們想做的事情体谒。
- To understand what this means, here is an analogy: Imagine you want your brother to buy you a cake from the store.
- 為了理解這是什么意思杯聚,這里有一個(gè)類比:想象你想讓你的兄弟從商店給你買一個(gè)蛋糕。
In Python, you would just use one line to say "Buy me a cake from the store."
在Python中抒痒,你只需要用一行字來(lái)表示“從商店給我買個(gè)蛋糕”幌绍。
Your brother will go and come back in 5 hours because he went to a store very far to get the best cake available.
你哥哥會(huì)在5個(gè)小時(shí)后回來(lái),因?yàn)樗チ艘患液苓h(yuǎn)的商店買最好的蛋糕故响。
In C, we can tell your brother, "Get in the car, drive to the store around the block, buy the first cake you see, and drive immediately back", which will happen in 20 odd minutes.
在C語(yǔ)言中傀广,我們可以告訴你的兄弟,“上車彩届,開車到附近街區(qū)的商店主儡,買第一個(gè)蛋糕,然后馬上開車回來(lái)”惨缆,這將在20多分鐘內(nèi)發(fā)生糜值。
Of course , it won’t be the best cake . But it is much faster and is the exact cake that you wanted .
當(dāng)然,這不會(huì)是最好的蛋糕坯墨。但是它的速度要快得多寂汇,而且正是你想要的蛋糕。
C特點(diǎn)三:可移植性
- Portable : Programs written in C can be run on different types of machines with little or no modifications .
- 可移植性:用C編寫的程序可以在不同類型的機(jī)器上運(yùn)行捣染,只需很少的修改或不需要修改骄瓣。