update C snipplets

This commit is contained in:
2024-04-27 23:54:46 +03:00
parent 42d18ccae1
commit f2b20118e0
59 changed files with 589 additions and 831 deletions

View File

@@ -0,0 +1,4 @@
/* size_t strlen(const char *s); */
size_t length;
length = strlen("Example string");

View File

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