--- title: "The C Column" type: "article" slug: "the-c-column-5" url: "http://localhost/article/the-c-column-5/" markdown_url: "http://localhost/article/the-c-column-5.md" published_at: "2026-01-21T12:38:44+00:00" modified_at: "2026-01-21T12:38:44+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "As promised talk about how C last month, I'll accesses files. The simplest way to discuss how C handles files is to take a look at a C program that uses it. Look at program number 5. This program asks the user for a file name. It then opens the file, reads in a character…" category: - name: "CATS Newsletter" slug: "cats-newsletter" taxonomy: "category" url: "http://localhost/category/periodicals/cats-newsletter/" post_tag: - name: "C (programming language)" slug: "c-programming-language" taxonomy: "post_tag" url: "http://localhost/tag/c-programming-language/" indiv: - name: "Tim Swenson" slug: "tim-swenson" taxonomy: "indiv" url: "http://localhost/indiv/tim-swenson/" publication_r: id: 35941 title: "CATS Newsletter" type: "periodical" url: "http://localhost/periodical/cats-newsletter/" authors_r: - name: "Tim Swenson" slug: "tim-swenson" taxonomy: "indiv" url: "http://localhost/indiv/tim-swenson/" volume: "8" issue: "2" issues_articles: - id: 38913 title: "CATS v8 n2" type: "issue" url: "http://localhost/issue/cats-v8-n2/" pages: "4-5" pubdate: "July 1990" archive_link: false --- # The C Column As promised talk about how C last month, I’ll accesses files. The simplest way to discuss how C handles files is to take a look at a C program that uses it. Look at program number 5. This program asks the user for a file name. It then opens the file, reads in a character and prints it out the Screen. This goes on for the entire file. The program declares a character array of size 20 to be hold the file name. It then declares the integer fd to hold the file ID. When a file is opened, C assigns a number to it. This number is returned from the fopen command to the variable fd.