So C or the compiler's for C are kind of dumb, by definition of the language years ago, whereby, they only know about what they've already seen.
所以C或者C的编译器是有点愚蠢的,根据多年前这个语言的定义,凭借那个,他们只知道,他们所看到的。
It turns out that in a lot of languages, C included, you the programmer knowing a bit about how the computer works and the language works, can exercise more fine-grained control.
结果在包括C语言的很多语言当中,你作为一个程序员懂得了一些计算机的工作方式,和语言的处理方式,可以更精确地控制运用它。
But to translate this now to a language C, you've got some curly braces, you got an if, some parentheses, but now we're just building on some of the syntax we introduced before.
如果把它转换成C语言,你又会看到一些大括号啊,if啊,圆括号啊等等,我们只是借助,之前学过的语法规则。
So I'm gonna go ahead and save this file, hello c it's hello.c, dot C hints at the fact that this program I just whipped up is written in a language called C.
所以我打算继续,保存,并命名为,“,c“表明这个程序,是使用C语言写的。
And generally in this language called "C" as well as a lot of others, almost all of your lines have to end with semicolons, but not all; just almost all and we'll see the difference.
通常在这个“C“语言中,像其他的语言一样,几乎所有的你们的代码行都要以分号结束,但不是所有的,只是大部分的,我们将看到他们的区别。
It's just some bogus language we made up that's kind of English-like, kind of look C-like now that you've seen this syntax, but it was just an arbitrary language.
并不是真正的编程语言,好比某种“伪英语“,或“类C语言“,你现在在语法中看到的就是所谓的伪代码,非常随意。
So here's where C differs from some language that you might be familiar with and from languages that you'll see later in the course, JavaScript like PHP and JavaScript.
这就是C与其它一些语言的不同之处,比如你熟悉的语言和,你们将在课程上看到的其它语言,像PHP和。
You have to with C, as with a lot of programming language, say what you return.
在C语言和大部分语言中,你必须说明函数的返回值。
Well, starting today in a language called C, this is going to look like this.
如果用今天的C语言写出来,就是屏幕上这样。
You do have mathematical operators in C and most every language.
在C语言还有一些其他,编程语言里有很多数学符号。
So here is the simplest program which is perhaps an ironic statement that you can implement with this language called C. So it takes a few lines of code to actually get something up and running and as you'll recall last Friday, I didn't even get this up and running because part of the process of writing a program is to one, write it.
让我们回到这个最简单的程序,你们也许觉得啼笑皆非,这么简单的例子,用C语言写出来就可以了嘛,的确只需要几行代码,就可以让这个程序跑起来,就像上周五的那样,我之所以没让它跑起来,因为编程步骤之一,就是“写“
But one of the teaching fellas also passed long to us recently, a little real world example of what happens when you're not mindful of various data types and you're not mindful of the imprecision that's inherent in representing data in a computer, at least using a language like C and low level primitives like floats and even doubles.
最近有个助教告诉我们,一个现实世界中的例子,当你不注意各种各样的数据类型,也不注意在计算机中表示数据时,其内在的不精确性,至少在用像C语言,和float甚至double型数据时,那将会发生什么?
应用推荐