Assignment h6 Instructions
This assignment involves four problems (named p01.c through p04.c) and all of them
involve opening a file from elsewhere, and reading it. Three of the programs will
involve using fgetc, and one will involve fscanf
* p01.c is simple, just open the README file in the same directory as your
program using fopen and output every character to the screen.
* p02.c involves reading a list of 1000 randomly generated numbers and finding
the sum, largest number and smallest number on the list. The file in question
is on the CS server at /u1/h1/jcompton5/nums1000.txt
* p03.c deals with finding the longest word in shakespeare.txt. You will be
using existing functions found in a program Dr.Sternfeld wrote for a recent
lecture, the wordChar and getNextWord functions in wis.c.
shakespeare.txt is at /u1/junk/shakespeare.txt
* p04.c deals with cleaning up a document. You will be given a short text file
that has Abraham Lincoln's famous Gettysburg Address, but it is in all caps.
Your task is to make it so that while the beginning of each sentence is still
capitalized, all of the other alphabetical letters are in lowercase.
This file is on the CS server at /u1/h1/jcompton5/gettysburgAllCaps.txt
You may need to read up on these functions
fopen
fgetc
fscanf
putchar
strlen
strcpy
and also refer to the following programs: which can be accessed either on the
server by going to ~sternfl/256F, or on the class website by clicking "In Class Code"
then clicking the "sternflCode" link
Useful Programs In that directory:
the.c - (from the Oct 12 lecture) demonstrating fopen and how many times "The"
appears in shakespeare.txt
wis.c - (From the Oct 14 lecture), you will be using the functions from this
program to do p03.c, the other wis programs may be useful to you as well
** CHECKING OUT THIS ASSIGNMENT**
To check out this assignment, go to your home directory and type in
"handin -C h6". When you are ready to submit, type in "handin h6" in your home
directory to turn in your assignment.
This assignment will be due on November 4, 2021 at 11:59 PM EDT