C So here I'm declaring a variable called c, and I'm pretty much translating the formula from the slide using the characters on my keyboard to a floating point value.
这里我声明了一个变量,然后我把那个幻灯片上的公式,用键盘上的字符翻译成了,浮点数值。
Today, I'm gonna start writing C code with you but I can't just write it and expect it to do anything.
现在,我和大家一起写C语言代码,但我不指望写出来后就能跑起来。
So, let's just arbitrarily put it between these two in this case here, but actually there's no reason we couldn't also put it between oxygen b and c, so I'm going to draw another structure where we have it here.
那么,让我们任意地将它们放在这两个之间,但实际上我们没有理由,不能把它们放在氧原子,B,与,C,之间,因此我将把另外一个结构画在这里。
Conversely, if I chose a Beta and my pair chooses an Alpha, so I end up with a C and she ends up with an A, then you know I have a bad time explaining to my parents why I got a C in this class, and I have to say about how I'm going to be president anyway.
相反如果我选β我对手选α,我得到C她得到了A,我回家后很难跟父母,解释为什么我只得到了C,然后我还得表示下雄心壮志
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语言写的。
I am going to run a program called Nano nano hello c and type nano hello.c and I'm gonna type the following very quickly without much explanation because we'll dive into this more next week.
我要运行一个Nano程序,键入,我快速写下下面的内容,不打算做过多的解释,因为下周我们会深入了解这些。
printf Well, notice I'm calling print F with percent C, and then I'm printing out each of these letters one at a time.
好的,请注意我用%c来调用,然后我打印出一个一个打印出这些字符。
Make then assumes I'm in a file called make math2.c and goes and finds it.
假设我在一个叫做“make,math2,c“的文件里,然后去找它。
I see no Mike Smiths because I'm on page 1 A where the A's simply are so I turn to the B's and the C's S and the D's and so forth and finally I get to the S's but in the worst case I've looked through 1,000 or so pages.
第一页没有找到叫Mike,Smith的人1,因为第一页姓名首字母是,于是我又接着找B,C,D……最终到了字母,但最坏的情况是,我翻了几千页才找到。
Well it's a stupid looking program, but because I had more new line characters, and because I was using percent C, for individual characters, one per line, now I'm seeing dot slash ARG V2, well, now if I go ahead and rerun this with foo, I get this effect as well.
这是一个看起来很笨的程序,但是因为我有更多的新行代码,因为我使用的是%c,为单个字符使用的,每一行一个,现在我看到的是,/argv2,好的,现在如果我继续用foo返回它,我产生了这样的效果。
So just to reinforce this, I could run gcc math2.c but I'm getting a little tired of this a.out convention and recall that there's this utility called "make" that right now doesn't really improve much, other than give it a better name.
所以我强调这点,我可以运行“gcc,math2,c“,但是我不是很喜欢a,out这个默认的名字,想取消它,那么这里有个叫做“make“的命令“,这个命令现在没有很大的改进,只是把用来更改名字用的。
应用推荐