- 博客(4)
- 资源 (43)
- 收藏
- 关注
原创 找出字符串中第一次出现一次的字符
#include #include #include char find_once_char(char * str) { int len=strlen(str); //char A[len]={0}; //int num[len]={0}; 这样 的 初始化是 不对 的 ,一个 运行 ,一个 编役 char *A=(char *)malloc(len); if(A==NULL) return -1; int *num=(int *)malloc(sizeof(int)*
2011-01-03 17:33:00 755
原创 c字符串的初始化
<br />#include<stdio.h> int main(int argc,char *args[]) { char str[10]="";//1 //char str[10]={'/0'};////////1 and 2 'result is the same; //char str[10]; //str[0]='/0';//这种方式只能让第一个字节为空,其他的未知 int a[10]; a[0]=5; int i=0; printf("%s",str)
2011-01-03 17:03:00 241
原创 约瑟夫环问题 链表实现
<br />#include<stdio.h> #include<assert.h> #include<malloc.h> #define NUM 10 struct node{ int num; struct node *next; }; struct node * joy; struct node * init() { struct node *head=(struct node *)(malloc(sizeof(struct node))); assert(head)
2011-01-02 16:11:00 277
原创 高质量编程指南读书笔记
<br /> 高质量编程指南读书笔记<br />运算符的优先级<br />单目运算符(++,sizeof,->)--算术运算符(+ * &)--位操作(>> >= & |)--逻辑操作(&& ||)<br /><br /><br />程序员的习惯<br />一般将目的参数放在前面,源参数放在后边<br />如果参数是指针且做输入使用,加const,防止该指针在函数体内被意外修改<br />void StringCopy(char *strDestination,const char *strSource);
2011-01-02 15:55:00 326
petshop(宠物商店) V4.0源码文件
2009-04-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人