CSC264 Computer Organization & Architecture II
Lab 3

Word Count

The wc command on unix/linux takes a file name and prints the following counts for the contents of the file: the number of newlines ('\n'), the number of words (contiguous non-whitespace characters). You can see examples and an explanation of the wc command at https://linuxize.com/post/linux-wc-command/

You can try the wc command on windows in windows powershell; you can try the wc command on OSX in a terminal window.

In this lab you will write your own version of wc. We will write a simplified version of the command which has no options and only accepts one filename.

Notes