snipplets.dev/code/C/clear_string.c
2023-09-26 22:05:13 +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;
}