snipplets.dev/snipplets/code/C/clear_string.c
2023-08-05 22:45:06 +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;
}