Week 2 数组

Watch the lecture

视频: https://www.youtube.com/watch?v=h5Gc1n8ZuU8

第2周 数组

数组。编译。调试。数组。字符串。命令行参数。密码学。

How to download source code into Visual Studio Code

  1. 登录 cs50.dev.

  2. In your terminal window, type

    wget https://cdn.cs50.net/2025/fall/lectures/2/src2.zip
    

    然后按 Enter in order to download a Zip file of lecture’s source code into your codespace.

  3. In your terminal window, type

    unzip src2.zip
    

    然后按 Enter to unzip (i.e., decompress) that Zip file.

  4. In your terminal window, type

    cd src2
    

    然后按 Enter in order to “change directory” into that src2 目录(即文件夹)。

  5. In your terminal window, type, e.g.,

    make hello0
    

    然后按 Enter in order to compile, e.g., hello0.c (源代码)生成 hello0 (机器码)。

  6. In your terminal window, type, e.g.,

    ./hello0
    

    然后按 Enter in order to run, e.g., hello0.