char * strcopy(char * a,char * b){ char * c = a; while ( (*a=*b)!='\0') { a++; b++; } return c; }/** 字符串的长度 @param strLen 需要求长度的字符串 @return 返回字符串的长度 */int strLens(const char * strLen){ int count = 0; while (*strLen!='\0') { count++; strLen++; } return count; }char * strcats(char * dest,char * src){ char * adest; for (adest =dest; *adest!='\0'; adest++) { printf("%p---333----%p\n",adest,dest); } for (char * asrc =src; (*adest =*asrc); adest++,asrc++) { printf("%s-e%p\n",adest,adest); } printf("%p\n--%p\n",adest,dest); return dest;}int myStrcmp(char *s1, char *s2) { for(;*s1&&*s2;s1++,s2++) { if(*s1==*s2) continue; else return *s1-*s2; } return *s1-*s2;}void Bubblealgorithm(char a[],int n){ int temp =0; for (int i =0; ia[j+1]) {
temp = a[j];
a[j] = a[j+1];
a[j+1]=temp;
}
}
}
}
网友评论