snipplets.dev/~/C/clear_string.c
2023-07-30 01:03:55 +03:00

11 lines
183 B
C

int main(int argc, char const *argv[])
{
char *buffer = malloc(256 + 1);
buffer[0] = '\0';
strcpy(buffer, "");
memset(buffer, '\0', sizeof(buffer));
return 0;
}