C Programming/stdio.h - Wikibooks, open books for an open world
https://en.wikibooks.org/wiki/C_Programming/stdio.h
WEBMay 19, 2023 · #include <stdio.h> #include <string.h> #include <stdlib.h> int main (void) {FILE * fp; size_t count; const char * str = "hello \n "; fp = fopen ("sample.txt", "w"); if (fp == NULL) {perror ("failed to open sample.txt"); return EXIT_FAILURE;} count = fwrite (str, 1, strlen (str), fp); printf ("Wrote %zu bytes. fclose(fp) %s. \n ", count, fclose ...
DA: 86 PA: 78 MOZ Rank: 4