07 2020 档案

摘要:1 #include<stdio.h> 2 # include <stdlib.h> 3 char *mystrncpy(char *dest,char *src,int n) 4 { 5 if(dest ==NULL|| src ==NULL) 6 { 7 return NULL; 8 } 9 w 阅读全文
posted @ 2020-07-21 10:06 辉白 阅读(73) 评论(0) 推荐(0)
摘要:关于memset的使用我也是第一次接触 下面的是通过系统函数来使用的 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 int main() 5 { 6 char *str1 = NULL; 7 str1 = (ch 阅读全文
posted @ 2020-07-21 09:09 辉白 阅读(15) 评论(0) 推荐(0)
摘要:字符串的定义大概有以下这4种 1 #include <stdio.h> 2 #include <stdlib.h> 3 int main() 4 { 5 //定义字符的方法有下面几种 6 char str[3] = {'c','b','a'}; 7 char str1[4] = "cba"; 8 p 阅读全文
posted @ 2020-07-19 17:50 辉白 阅读(1804) 评论(0) 推荐(0)
摘要:前面学习了指针数组,今天学了数组指 这两个是不同的含义,下面通过代码来实现 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 //数组的指针 5 int main() 6 { 7 int a[3]={1,2,3}; 8 int (*p)[3]; 9 p=a 阅读全文
posted @ 2020-07-19 10:05 辉白 阅读(26) 评论(0) 推荐(0)