COSC 450/550 Project 1 Project 1 – Programing in C

COSC 450/550 Project 1
Project 1 – Programing in C
Due Monday, 11/07.
Specifications:
1. This is an individual assignment. You will work on this assignment by yourself.
2. Please use the programming language C to create a program to do the following:
a. Open and read from the data file, “COSC450_P1_Data.txt”, which contains some
number of integer values (separated by white space character(s)) with the number of
integers a multiple of 10. A sample “COSC450_P1_Data.txt” file will be given to you but
your program should be able to process any “COSC450_P1_Data.txt” file with the above
property.
b. After read in the data file your program will process the integer values into two matrixes
(stored in two dimension arrays): the first one with the dimension 5 * X and the second
one X * 5, where X is some value determined by the number of integers in the input
data file.
c. Output the above two matrixes (in a formatted way) into an output file,
“COSC450_P1_Output.txt”, created by your program.
d. Calculate a product matrix (a two-dimension array of long integers) based on the first
matrix multiplies the second matrix;
e. Write the product matrix out to the same output file, “COSC450_P1_Output.txt”, by
appending it to the end;
f. Bonus points for undergraduates (10 points) and required for graduates: sort the
product matrix and append it to the end of the above output file,
“COSC450_P1_Output.txt”. Your sorting cannot be done by copy the values out from
the matrix into a single dimension array then put it back but has to be done on the
matrix directly by manipulating the subscripts correctly.
3. Please start work on this project earlier. It will take some time for you to get familiar with C to
create the program.
Deliverables:
1. Submit your (zipped but not rar, if multiple files) C source code file(s) to the Blackboard before
the due time.
2. Screen shot and paste the output in a word document, and submit it on blackboard.
Grading:
1. Total 100 points, excluding the 10 bonus points for undergraduates.
Powered by