Homework 3 Solution

$30.00 $24.00

Create a program uses “system” to call “WGET” to download the file (http://undcemcs01.und.edu/~ronald.marsh/CLASS/CS451/hw3-data.txt). The program must then open and load the file into a character array. However, you must assume that you do not know the size of the hw3-data.txt file in advance (its size will change when we tests on your program). Therefore, your…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Categorys:
Tags:

Description

5/5 – (2 votes)

Create a program uses “system” to call “WGET” to download the file

(http://undcemcs01.und.edu/~ronald.marsh/CLASS/CS451/hw3-data.txt).

The program must then open and load the file into a character array.

However, you must assume that you do not know the size of the

hw3-data.txt file in advance (its size will change when we tests on your

program). Therefore, your program must somehow determine the size of

the file, create a dynamic array large enough, and load the data into

the array. As you load the array it would be wise to also convert all

uppercase characters to lowercase at this time.

Once you have the array populated create 2 threads (see UNIX notes on

website). One thread must search for all occurences of the word “Easy”.

The second thread must search for all occurences of the word “Polar”.

Both threads must also display the number of occurences of each word.

* Don’t forget to delete the dynamic array once you no longer need it.

* While you could do this assignment without threads, doing so will

cost you at least 15 points.

REQUIREMENTS:

————-

1. Your program must run on Mint.

2. Your full name must appear as a comment at the beginning of your

program.

3. Your source code must be named hw3-yourname.c or hw3-yourname.cpp

Homework 3 Solution
$30.00 $24.00