Lập trình C
Từ printf đến con trỏ, bộ nhớ và cấu trúc dữ liệu — viết trong trình duyệt của bạn và biên dịch, chạy trên máy chủ của chúng tôi.
- c
- 23 Bài học
- 23 videos
- Chạy trực tiếp trên trình duyệt của bạn
Trên thiết bị này: 0 trong số 23 bài học đã hoàn thành
Mỗi bài học chạy trên trình duyệt của bạn — viết mã thật, nhấn Chạy, và các nhiệm vụ tự kiểm tra. Miễn phí, không cần tài khoản, kèm ghi chú dịch song ngữ với tiếng Anh.
Các bài học trong khóa học này
Đang hiển thị 27 trong số 27 bài học
Không có bài học nào khớp. Xóa bộ lọc tìm kiếm hoặc chọn bộ lọc khác.
- C cơ bản: main, printf, và hàm C là ngôn ngữ biên dịch · Khung xương của C · printf và các kiểu dữ liệu Lesson 1 · 3 nhiệm vụ bắt buộc · ★ Video
- Variables, types, and arithmetic Every value has a type · Doing arithmetic · Integers divide differently · Reading input Lesson 2 · 3 nhiệm vụ bắt buộc · ★ Video
- Booleans and selection: if, else, switch True and false in C · Comparing and combining · if / else if / else · switch: choosing among many values Lesson 3 · 3 nhiệm vụ bắt buộc · ★★ Video
- Loops: while, for, and accumulation Repeating work · while loops · for loops · Accumulation and counting Lesson 4 · 3 nhiệm vụ bắt buộc · ★★ Video
- Functions, parameters, and return values Why functions · Parameters and return values · void functions, and building big from small · C copies your arguments Lesson 5 · 3 nhiệm vụ bắt buộc · ★★ Video
- Nested loops and patterns A loop inside a loop · Rows and columns · Building a line, then a block · Counting with nested loops Lesson 6 · 3 nhiệm vụ bắt buộc · ★★★ Video
- 1-D arrays: store, index, and traverse A row of boxes · Indexing from 0 · Traversing with a loop · Arrays don't know their own length Lesson 7 · 3 nhiệm vụ bắt buộc · ★★ Video
- Pointers: &, *, and pass-by-pointer A problem from last lesson · Every variable has an address · A pointer holds an address · Out-pointers: giving back more than one answer Lesson 8 · 3 nhiệm vụ bắt buộc · ★★★ Video
- Strings: char arrays and the null terminator Text is an array of chars · The invisible terminator '\0' · Walking a string · The <string.h> toolbox Lesson 9 · 3 nhiệm vụ bắt buộc · ★★★ Video
- Array algorithms: max, count, search, average Four classic array jobs · Finding the maximum · Counting with a condition · Linear search Lesson 10 · 4 nhiệm vụ bắt buộc · ★★★ Video
- 2-D arrays: working with a grid A grid of boxes · Rows then columns (row-major) · Passing a 2-D array · Working one row at a time Lesson 11 · 3 nhiệm vụ bắt buộc · ★★★ Video
- Searching: linear and binary Two ways to search · Linear search · Why sorting enables binary search · low, high, mid Lesson 12 · 3 nhiệm vụ bắt buộc · ★★★ Video
- Sorting: bubble, selection, and insertion Putting an array in order · Swapping two elements · Bubble sort · Insertion sort Lesson 13 · 3 nhiệm vụ bắt buộc · ★★★★ Video
- Recursion: base case and recursive case A function that calls itself · The base case · The recursive case · Recursion over an array Lesson 14 · 3 nhiệm vụ bắt buộc · ★★★★ Video
- Structs and typedef: . vs -> Grouping related data · struct and typedef · Member access with . · Through a pointer with -> Lesson 15 · 3 nhiệm vụ bắt buộc · ★★★ Video
- Dynamic memory: malloc, free, and realloc Stack memory vs heap memory · malloc and sizeof · free and memory leaks · Growing an array with realloc Lesson 16 · 3 nhiệm vụ bắt buộc · ★★★★ Video
- Danh sách liên kết Nodes joined by pointers · A self-referential struct · head and the NULL end · Adding a node at the front Lesson 17 · 3 nhiệm vụ bắt buộc · ★★★★★ Video
- Stacks and queues (array-backed) Two ways to hold items · A stack is LIFO · Array-backed stack · A queue is FIFO Lesson 18 · 3 nhiệm vụ bắt buộc · ★★★★ Video
- Text files: write then read Files keep data after the program ends · Opening and closing · Writing with fprintf · Reading with fscanf and fgets Lesson 19 · 3 nhiệm vụ bắt buộc · ★★★ Video
- Xử lý lỗi với mã trả về C has no try/except · Return a status code · Reporting the answer through an out-pointer · Sentinels for "no value" Lesson 20 · 3 nhiệm vụ bắt buộc · ★★★ Video
- Bits, binary, and bitwise operators Numbers are bits · Place value and powers of two · Reading a bit with >> and & 1 · The bitwise operators Lesson 21 · 3 nhiệm vụ bắt buộc · ★★★ Video
- Run-length encoding (compression) Squeezing repeated data · What a "run" is · Counting a run · Building the encoded string Lesson 22 · 3 nhiệm vụ bắt buộc · ★★★★ Video
- Preprocessor, const, static, and enum What runs before the compiler · #include and #define · const vs #define · static and enum Lesson 23 · 3 nhiệm vụ bắt buộc · ★★★ Video
Đọc và tài liệu tham khảo
- Lịch sử ngắn gọn về C Where C came from · Close to the machine · The famous book · C today Đọc và tài liệu tham khảo
- C được sử dụng cho việc gì What people build with C · Operating systems · Tiny computers everywhere · Databases and other languages Đọc và tài liệu tham khảo
- Nơi tìm hiểu thêm Chơi và thực hành · Đọc và tham khảo · Thêm nội dung trên trang này · Mẹo Đọc và tài liệu tham khảo
- Cài đặt máy tính của bạn Run C on your own computer · Step 1 — Install a compiler · Step 2 — Install VS Code · Step 3 — Add the C/C++ extension Đọc và tài liệu tham khảo
Open the C reference
Every topic in one place, with short examples you can run.
Nơi tìm hiểu thêm
- Learn-C.org Các bài học C miễn phí, thực hành trực tiếp trên trình duyệt
- Exercism — lộ trình C Các bài tập nhỏ với phản hồi từ cố vấn thân thiện
- HackerRank — C Bài tập thực hành, từ dễ đến khó
- cppreference — C Tài liệu tham khảo miễn phí, cẩn thận cho mọi hàm C
- Ngôn ngữ Lập trình C (K&R) Cuốn sách kinh điển do những người tạo ra C viết ra
- Visual Studio Code Trình soạn thảo miễn phí để viết C trên máy tính của riêng bạn
- Bài tập thực hành C (trang web này) Thử thách C bổ sung để kiểm tra bản thân
- AP CS A (trang web này) Học Java, họ hàng gần khác của C