#include <string.h> int main() { const char *str = "12345"; size_t m = strlen(str); char a[m];//={'\0'}; memset( a, 0, sizeof(a) ); return 0; }