COEN12 – Computer Engineering 12 (Solution)

$ 29.99
Category:

Description

Project 1: Counting the Number of Words
1 Introduction
In this project, you will implement an application to read words from a text file. The filename will be supplied on the command line. Your program should display the total number of words in the file. (Consider a word to be a sequence of non-white-space characters.) Here is an example of how your program will be run:
$ ./a.out /scratch/coen12/Macbeth.txt
18464 total words
2 Implementation
You can assume that there is a maximum word length. However, this value should be properly declared as a symbolic constant and documented:
# define MAX_WORD_LENGTH 30
Your program should work correctly on all of the example files under /scratch/coen12. To make grading easier, please match the example output shown above.
3 Submission
Call your source file count.c and submit the file using the online submission system on the course website. Your username is the same as your Design Center username, and your password is the last seven digits of your ID.
4 Grading
Your implementation will be evaluated as follows:
• correctness: 60 points
• clarity of implementation: 20 points
• commenting and style: 20 points
Your implementation must compile and run on the workstations in the lab. If your implementation does not compile, you will receive zero points toward correctness.

Reviews

There are no reviews yet.

Be the first to review “COEN12 – Computer Engineering 12 (Solution)”

Your email address will not be published. Required fields are marked *