实现strcpy
#include <stddef.h> 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; }
#include <stddef.h> 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; }