4 ms·
str = (char *) malloc(sizeof(char) * (strlen(TESTSTRING)+1)); strcpy(str,TESTSTRING); str = strdup(TESTSTRING)?
by saagarjha 8y ago
str = (char *) malloc(sizeof(char) * (strlen(TESTSTRING)+1));
strcpy(str,TESTSTRING);
str = strdup(TESTSTRING)?