Question: PROGRAMMING IN C LANGUAGE Requriements Program must compile with both -Wall and -Werror options enabled Submit only the files requested Use doubles to store real

PROGRAMMING IN C LANGUAGE

Requriements

  • Program must compile with both -Wall and -Werror options enabled
  • Submit only the files requested
  • Use doubles to store real numbers
  • Print all doubles to 2 decimal points unless stated otherwise

Restrictions

  • No global variables may be used
  • Your main function may only declare variables and call other functions

Description

Write a program that counts the number words contained within a file

Additional Details

  • The name of the file will be passed on the command line
  • A word is considered to be 1 or more consecutive whitespace characters
  • A character is considered whitespace if isspace would return true if passed that character as an arguement
  • smileys should be considered as words

Input

  • Input will always be valid

Hints

  • The test case files are available under the starter code

Examples

User input has been underlined to help you differentiate what is user input and what is program output.

Example 1

Assume that the file fun.txt contains the following:

Computer sciences classes are great!

Even though I spend all my time doing homework :(

./wcount fun.txt

There are 15 word(s).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!