摘要: #define _CRT_SECURE_NO_WARNINGS #include #include #include //有一个字符串符合以下特征(”abcdef,acccd,eeee,aaaa,e3eeeee,sssss,";) //分清楚赋值指针变量 和 操作逻辑之间的关系 int spitString(const char *buf1, char c, char buf2[... 阅读全文
posted @ 2018-08-03 22:17 季以 阅读(206) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include #include #include char **getMem51(int num) { int i = 0; char **p2 = NULL; p2 = (char **)malloc(sizeof(char *) * num); if (p2 == NULL) ... 阅读全文
posted @ 2018-08-03 22:16 季以 阅读(226) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include #include #include void main2() { int i = 0; //指针数组 char * p1[] = {"123", "456", "789"}; //二维数组 char p2[3][4] = {"123", "456",... 阅读全文
posted @ 2018-08-03 22:13 季以 阅读(83) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include #include #include // void main41() { int i = 0, j = 0; char **p2 = NULL; int num = 5; char *tmp = NULL; char tmpbuf[100]; p2 = (... 阅读全文
posted @ 2018-08-03 22:10 季以 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include #include #include //打印 排序 //封装成函数 void main31() { int i = 0, j = 0; int num = 4; char myBuf[30]; char tmpBuf[30]; char myArray[10... 阅读全文
posted @ 2018-08-03 22:04 季以 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include #include #include void main21() { int i = 0, j = 0; int num = 0; char *tmp = NULL; //数组 数组中的每一个元素是指针 指针数组 char *myA... 阅读全文
posted @ 2018-08-03 22:01 季以 阅读(142) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include #include #include void main71() { char a[] = "i am a student"; char b[64]; int i = 0; for (i=0; *(a+i) != '\0'; i++) { *(b... 阅读全文
posted @ 2018-08-03 21:54 季以 阅读(205) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include #include #include //char *p = "abcd111122abcd3333322abcd3333322qqq"; //求字符串p中 abcd出现的次数 //1请自定义函数接口,完成上述需求 50 // i++ ++ ++ //2 自定义的业务函数 和 main函数必须分开 5... 阅读全文
posted @ 2018-08-03 21:53 季以 阅读(5437) 评论(0) 推荐(0) 编辑
摘要: //一级指针的典型用法//数组 int a[10]//字符串 //1 C语言的字符串 以零结尾的字符串//2 在C语言中没有字符串类型 通过字符数组 来模拟字符串 //3 字符串的内存分配 堆上 栈上 全局区 (很重要) 字符串的初始化 //通过数组下标 和 指针 阅读全文
posted @ 2018-08-03 21:51 季以 阅读(156) 评论(0) 推荐(0) 编辑