摘要: #include <stdio.h> void test() { printf("输出了内容\n"); } int main(void) { test(); int number = 10; // 定义指针的方式: 需要指向的类型 *指针的名称 = 0; int* point = 0; // 这个写 阅读全文
posted @ 2020-02-24 20:39 冫恋丶 阅读(467) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> // 作用域: 在哪里能够访问到它 // 生命周期: 内存和变量存在关联的时间 // 全局变量:定义在任何一个花括号之外的变量就是全局变量 // 作用域: 全局变量的作用域是定义位置到所在文件结束【在其它文件中使用 extern 可以访问】 // 生命周期: 整 阅读全文
posted @ 2020-02-24 20:37 冫恋丶 阅读(218) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> // 系统环境变量(通常包含的是标准库头文件) #include "header.h" // 当前路径 + 系统环境变量(通常包含的是用户自定义的文件) #include <conio.h> // 使用函数的三个步骤: 声明函数 + 定义函数 + 调用函数 // 阅读全文
posted @ 2020-02-24 20:35 冫恋丶 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 //给stuct _STUDENT 起一个别名 为 STUDENT,*PSTUDENT 6 typedef struct _STUDENT 7 { 8 char 阅读全文
posted @ 2020-02-24 18:15 冫恋丶 阅读(655) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> //起别名 typedef struct _STUDENT { //学生的编号 int Num; char sName[20]; int nScore; }STUDENT,*PSTU 阅读全文
posted @ 2020-02-24 14:14 冫恋丶 阅读(177) 评论(0) 推荐(0) 编辑