📚 The CoCalc Library - books, templates and other resources
1/* Example code for Think OS. 2 3Copyright 2014 Allen Downey 4License: GNU GPLv3 5 6*/ 7 8#include <stdio.h> 9int main() 10{ 11 FILE *fp = fopen("/home/downey/file.txt", "w"); 12 fputc('b', fp); 13 fclose(fp); 14 15 fopen("/home/downey/file.txt", "r"); 16 char c = fgetc(fp); 17 printf("%c\n", c); 18} 19 20