上一页 1 ··· 7 8 9 10 11
  2022年2月28日
摘要: 结构体 1、结构体的声明和结构体变量的定义 #include <stdio.h> #include <string.h> int main() { struct Person { char name[20]; char address[20]; }; struct Person A; struct Pers 阅读全文
posted @ 2022-02-28 15:52 轩~邈 阅读(80) 评论(0) 推荐(0)
  2022年2月25日
摘要: 字符串函数 1、strcpy 函数 #include <stdio.h> #include <string.h> int main(void) { char boy_Name1[20]; const char* boy_Name2 = "Mingming "; strcpy(boy_Name1, boy_Nam 阅读全文
posted @ 2022-02-25 12:07 轩~邈 阅读(84) 评论(0) 推荐(0)
  2021年12月6日
摘要: 字符串 字符串的声明和定义 字符串是以空字符(\0)结尾的char类型数组,如果没有空字符(\0),那么就是字符数组而不是字符串。 利用数组和指针形式创建字符串 #include <stdio.h> int main() { char words_1[30] = "\"Run! Forrest, run!\ 阅读全文
posted @ 2021-12-06 20:50 轩~邈 阅读(145) 评论(0) 推荐(0)
  2021年12月1日
摘要: 指针学习 1、 指针是什么? 指针表示变量的地址,例如ptr=& pooh,其中&取地址符取出pooh变量的地址然后赋值给ptr,此时ptr可看成指针变量,指向pooh变量 2、指针变量的声明和赋值 int *pi, char *pc, float *pf 3、取地址运算符 和 解引用运算符 (1)取地址运算 阅读全文
posted @ 2021-12-01 22:38 轩~邈 阅读(48) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11