2013年9月27日
摘要: #include char* strcpy(char* dest, const char* src){ if (dest == NULL || src == NULL) return NULL; if (dest == src) return dest; char* tmp = dest; while ((*dest++ = *src++) != '\0'); return tmp;} 阅读全文
posted @ 2013-09-27 17:06 chenkkkabc 阅读(142) 评论(0) 推荐(0) 编辑
摘要: C语言关键字 sizeof 是一个操作符,返回对象或类型所占内存字节数,类型为size_t(定义在),有2种用法:sizeof unary-expressionsizeof (type-name)sizeof不能应用的场合:an expression that has function type or an incomplete typethe parenthesized name of such a typean expression that designates a bit-field member如果操作数的类型是VLA (variable length array),要进行evalu 阅读全文
posted @ 2013-09-27 15:43 chenkkkabc 阅读(831) 评论(4) 推荐(0) 编辑