为C语言系统教程第八章《作用域与存储类别》添加了参考答案#121
Merged
Charliechen114514 merged 20 commits intoJul 20, 2026
Merged
Conversation
追加到 PR Awesome-Embedded-Learning-Studio#104 的 review 修正,纯注释、零逻辑改动: - payload_len / index: 把「几个负载」改成「几个字节」, 代码实际含义如此,负载更像是完整的Payload,跟代码还是具备实际差距 - kStateHeader: 修正为「帧头已收完,接下来等长度字节」, - 顺手修了结构体注释的对齐(payload[64])
Added example solutions for exercises on data types and overflow in C.
搞忘把“### 练习 1 参考答案”打上去了awa 其他.md格式修正是 VS Code 插件自动修改的格式
第六章的第三题难度有点高,这个答案我就不写了,交给你来写。 第二题也交给你了。 awa
Member
|
看得出来有一些不容易,我审查一下稍后改 |
练习答案代码质量修正,纯格式/调用/注释调整,零逻辑改动。 07A-pointer-essentials.md: - 练习1: sizeof/size_t 改用 %zu(原 %d 触发 -Wformat 警告) - 练习1: %p 参数加 (void*) 强转(标准要求 void*,消除 UB) - 练习1: 输出示例换真实地址格式,补 char=48 与栈地址间隔两点说明 - 练习2: size_t 索引改用 %zu;补 #include <stddef.h> 06-scope-and-storage.md: - 练习2: 让两个同名 static helper_a 各被模块公共函数调用(消除 unused-function 警告,顺便把"同名 static 互不干扰"演示得更透彻) - 练习3: config 改用 static 初始化器呼应题目提示,flag 只负责打印 全部 5 段经 -Wall -Wextra -std=c17 编译零警告、运行输出正确。
Member
|
LGTM |
Charliechen114514
merged commit Jul 20, 2026
9165373
into
Awesome-Embedded-Learning-Studio:main
4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.