摘要: #include <stdio.h>int head_flag = 0;int success = 0;int my_strlen(char *str) { int i = 0; while(*str != '\0') { i++; str++; } return i;}char *head_add(char *str,char *head){ if(str == NULL ||head == NULL ) { return NULL; } if(my_strlen(str) <... 阅读全文
posted @ 2013-04-16 22:09 菜鸟上路ING 阅读(702) 评论(0) 推荐(0) 编辑
摘要: #includestruct node{ intnum;//4 charname[20]; //20 charsex;//1 intage;//4 floatscore;//4 charadd[30];//30};int main(){ struct nodep;printf("%d",sizeof(p));printf("\n************\n");printf("%d\n",sizeof(float)); return0;}/* 内存地址要对齐。。 结构体每个保存都是按照最长的定义类型来的。 字节对齐的细节和编译器实现相 阅读全文
posted @ 2013-04-16 21:55 菜鸟上路ING 阅读(1045) 评论(1) 推荐(0) 编辑