2013年3月11日 星期一

Clang 編譯器 (compiler)

Clang is the name of a compiler

編譯器

a program that converts source code into object code (0's and 1's)

command to compile a file: "clang hello.c"

command for running object code file: "./a.out"
("." represents the current folder 目前所在的資料夾)


command:to 編譯 "clang -o hello hello.c"
then, command to 執行: "./hello"



Gedit

1. Color coding:

save a file with the ".c" extension and Gedit will color code the source code in the file

例: "hello.c"

2. to open a file using Gedit: "gedit holloyway.c"



jharvard

"jharvard" is the user account created for everyone to use, hence it is seen at the command prompt


David Malan uses Gedit in Fedora

CS50 appliance

a free software called a hypervisor


Different terms for the same thing - function


function = method = procedure


程式語言 Programming Language - String


程式語言 programming language 中的 "String" 是指 : "a sequence of zero or more characters"


C 語言 - Statement

Statement:  an instruction to do something

例:

printf("hello, world!\n");

the "f" in printf stands for "format"


從 Scratch 轉換到 C 語言 - first C program

#include <stdio.h>

int main(void)
{

printf("hello, world!\n");
return 0;

}


哈佛 CS50 Walkthroughs


cs50.net/psets


哈佛 CS50 筆記

CS50 Scribe Notes: (linked on lectures page)

a canonical set of notes written by a TA

snarky footnotes at the bottom


2013年3月10日 星期日

哈佛 CS50 庫存網址

哈佛 CS50 課程庫存網址 (Harvard University Computer Science Course):

cs50.tv