1 2 3 4

2020年12月16日

C语言之空指针

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h> #define _CRT_SCURCE_NO_WARINGSint main(){ //空指针就是指向空地址的一个指针,通常用于条件判断来使用 int *p1 = NULL; print 阅读全文

posted @ 2020-12-16 20:58 三日坊主i 阅读(464) 评论(0) 推荐(0)

C语言之指针的定义与使用

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h> #define _CRT_SCURCE_NO_WARINGSint main(int argc, char *argv[]){ int x = 10; int *p1 = &x; //被 阅读全文

posted @ 2020-12-16 17:28 三日坊主i 阅读(215) 评论(0) 推荐(0)

C语言多文件联合编程模式

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h> extern void Speaks(); //extern关键字修饰的变量和函数等,都是可以被整个项目共享调用的,所以可以使用extern函数来引入其他文件的内容,但是要把要引入的东西 阅读全文

posted @ 2020-12-16 17:08 三日坊主i 阅读(216) 评论(0) 推荐(0)

C语言之函数的定义与使用

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#define _CRT_SCURCE_NO_WARINGS void speak(){ printf("我很帅。。 \n"); // 无参数,无返回值的 阅读全文

posted @ 2020-12-16 17:01 三日坊主i 阅读(536) 评论(0) 推荐(0)

C语言之字符串转换

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>#define _CRT_SCURCE_NO_WARINGS int main(){ char add[] = "100 a"; //当字符串中有转换的数据类型的数据的时候,可以使用ato 阅读全文

posted @ 2020-12-16 16:41 三日坊主i 阅读(1221) 评论(0) 推荐(0)

C语言之strtok函数

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>#define _CRT_SCURCE_NO_WARINGS int main(){ char add[] = {"JingsliLiu"}; printf("未使用strtok之前: " 阅读全文

posted @ 2020-12-16 16:30 三日坊主i 阅读(221) 评论(0) 推荐(0)

C语言之strchr函数

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>#define _CRT_SCURCE_NO_WARINGS int main(){//strchr函数就是将要查找的字符查找到之后,从查到到的地方开始,记住后面的字符。 char add 阅读全文

posted @ 2020-12-16 14:53 三日坊主i 阅读(243) 评论(0) 推荐(0)

C语言之sscanf函数

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>#define _CRT_SCURCE_NO_WARINGS int main(){ //sscanf函数就是将字符串内的内容格式化后取出,然后装进相对的数据类型的变量中 int x=12 阅读全文

posted @ 2020-12-16 14:45 三日坊主i 阅读(157) 评论(0) 推荐(0)

C语言之sprintf函数

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>#define _CRT_SCURCE_NO_WARINGS int main(){ // sprintf函数可以将其他类型的数据和字符类型的数据写到另一个字符串当中去,当然,必须是先字符 阅读全文

posted @ 2020-12-16 14:39 三日坊主i 阅读(212) 评论(0) 推荐(0)

导航