Created
December 23, 2024 20:01
-
-
Save webgtx/5635f05b388efdaa2ee10b3c0f9c3fb6 to your computer and use it in GitHub Desktop.
Revisions
-
webgtx created this gist
Dec 23, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #include <string.h> #include <stdio.h> #include <stdlib.h> #define BUFFER_SIZE 512 int main(void) { char* string = malloc(sizeof(char) * BUFFER_SIZE); if (!string) return 1; strcpy(string, "pneumenoultramicroscopicsilicovolcanoconiosis\n"); // Remove new line from the string string[strcspn(string, "\n")] = '\0'; puts(string); free(string); }