摘要:
#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;} 阅读全文
摘要:
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 阅读全文