{"id":22283771,"url":"https://github.com/veaba/learn-c","last_synced_at":"2025-03-25T19:51:41.744Z","repository":{"id":104582183,"uuid":"378705178","full_name":"veaba/learn-c","owner":"veaba","description":"learn c","archived":false,"fork":false,"pushed_at":"2021-11-06T07:40:51.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T17:39:41.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/veaba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-20T17:39:23.000Z","updated_at":"2021-11-06T07:40:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb617e4e-d7ae-4450-95ef-3cb5fa09f0b4","html_url":"https://github.com/veaba/learn-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Flearn-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Flearn-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Flearn-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Flearn-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veaba","download_url":"https://codeload.github.com/veaba/learn-c/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245535442,"owners_count":20631294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T16:42:08.118Z","updated_at":"2025-03-25T19:51:41.720Z","avatar_url":"https://github.com/veaba.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 关键字\n\n|          |                                                               |\n| -------- | ------------------------------------------------------------- |\n| 关键字   | 说明                                                          |\n| auto     | 声明自动变量                                                  |\n| break    | 跳出当前循环                                                  |\n| case     | 开关语句分支                                                  |\n| char     | 声明字符型变量或函数返回值类型                                |\n| const    | 定义常量，如果一个变量被 const 修饰，那么它的值就不能再被改变 |\n| continue | 结束当前循环，开始下一轮循环                                  |\n| default  | 开关语句中的\"其它\"分支                                        |\n| do       | 循环语句的循环体                                              |\n| double   | 声明双精度浮点型变量或函数返回值类型                          |\n| else     | 条件语句否定分支（与 if 连用）                                |\n| enum     | 声明枚举类型                                                  |\n| extern   | 声明变量或函数是在其它文件或本文件的其他位置定义              |\n| float    | 声明浮点型变量或函数返回值类型                                |\n| for      | 一种循环语句                                                  |\n| goto     | 无条件跳转语句                                                |\n| if       | 条件语句                                                      |\n| int      | 声明整型变量或函数                                            |\n| long     | 声明长整型变量或函数返回值类型                                |\n| register | 声明寄存器变量                                                |\n| return   | 子程序返回语句（可以带参数，也可不带参数）                    |\n| short    | 声明短整型变量或函数                                          |\n| signed   | 声明有符号类型变量或函数                                      |\n| sizeof   | 计算数据类型或变量长度（即所占字节数）                        |\n| static   | 声明静态变量                                                  |\n| struct   | 声明结构体类型                                                |\n| switch   | 用于开关语句                                                  |\n| typedef  | 用以给数据类型取别名                                          |\n| unsigned | 声明无符号类型变量或函数                                      |\n| union    | 声明共用体类型                                                |\n| void     | 声明函数无返回值或无参数，声明无类型指针                      |\n| volatile | 说明变量在程序执行中可被隐含地改变                            |\n| while    | 循环语句的循环条件                                            |\n\n## 数据类型\n\n- 基本类型\n  - 整数类型\n\n| 类型           | 存储大小    | 范围                                 |\n| -------------- | ----------- | ------------------------------------ |\n| char           | 1 字节      | -128~127 or 0~255                    |\n| unsigned char  | 1 字节      | 0~255                                |\n| signed char    | 1 字节      | -128~127                             |\n| int            | 2 或 4 字节 | -32768~32767、-2147483648~2147483647 |\n| unsigned int   | 2 或 2 字节 | 0~65535、0~4294967295                |\n| short          | 2 字节      | -32768~32767                         |\n| unsigned short | 2 字节      | 0~65535                              |\n| long           | 4 字节      | -2147483648~2147483647               |\n| unsigned long  | 4 字节      | 0~4294967285                         |\n\n~存储大小与系统位数有关系~\n![](https://www.runoob.com/wp-content/uploads/2014/09/32-64.jpg)\n\n- 浮点类型\n\n| 类型        | 存储大小 | 值范围              | 精度      |\n| ----------- | -------- | ------------------- | --------- |\n| float       | 4 字节   | 1.2E-38 ~ 3.4E+38   | 6 位小数  |\n| double      | 8 字节   | 2.3E-308~1.7E+308   | 15 位小数 |\n| long double | 16 字节  | 3.4E-4932~1.1e+4932 | 19 位小数 |\n\n- 枚举类型\n  - 离散整数值变量\n- void 类型\n  - 无可用的值\n- 派生类型\n  - 指针类型\n  - 数据类型\n  - 结构类型\n  - 共用提类型\n  - 函数类型\n\n### 整数常量\n\n- 85 十进制\n- 0213 八进制\n- 2x4b 十六进制\n- 30 整数\n- 30u 无符号整数？\n- 30l 长整数\n- 30ul 无符号长整数\n\n### 浮点常量\n\n### 字符串、常量\n\n| 转义   | 描述                     |\n| ------ | ------------------------ |\n| `\\\\`   | \\字符                    |\n| `\\'`   | '字符串                  |\n| `\\\"`   | \"字符                    |\n| `\\?`   | ?字符                    |\n| `\\a`   | 警报铃声？               |\n| `\\b`   | 退格键                   |\n| `\\f`   | 换页符                   |\n| `\\n`   | 换行符                   |\n| `\\r`   | 回车                     |\n| `\\t`   | 水平制表符               |\n| `\\v`   | 垂直制表符               |\n| `\\ooo` | 一到三位八进制           |\n| `\\xhh` | 一个或多个数字的十六进制 |\n\n### 字符串常量\n\n- `#define` 预处理器定义常量\n- `const` 关键字定义常量\n\n## 格式化表示字符\n\n| 字符 | 描述                       | 结果           |\n| ---- | -------------------------- | -------------- |\n| %E   | 指数形式输出单、双精度实数 | `3.402823E+38` |\n| %d   |                            |\n| %lu  |                            |\n| %s   |                            |\n\n## 常用函数\n\n- sizeof\n\n## 变量\n\n- 可以使用`extern` 声明，但补丁已\n\n## 存储类\n\n- auto\n- register\n- static\n- extern\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveaba%2Flearn-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveaba%2Flearn-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveaba%2Flearn-c/lists"}