CSE102 – Computer Programming with C Assignment #0 (Solution)

$ 29.99
Category:

Description

This assignment will get you acquainted with C language basics and the development environment.
You are expected to complete the code in the given project. The project files are given in the attached ZIP file (hw0_src). There are two files you are expected to modify with the following tasks:
1. main.c: In the main function, you are expected to read two fractional numbers (a fractional number is composed of two integers representing the numerator and denominator of the fraction) and perform the four basic arithmetic operations on these, namely, addition, subtraction, multiplication and division. You are expected to use the function provided in utils.h.
Besides writing some C code as indicated above, the purpose of this assignment is to teach you how makefiles work and how to edit C files and compile them on Ubuntu using GCC (version provided in class) will be used to test your codes and grade them.
General Rules:

• Obey the style guidelines.
• Do not change the provided function prototypes (you will not get any credits).
• Your program should work as expected. Do not expect partial credit if your code works only in some cases but not in all cases as expected.
• You can ask your questions about the homework by positing on the forum in Teams.
Handing in your work:
• Hand in your work using the appropriate class Teams assignment site.
• Please pack your solution directory in the following way (assuming a student with number 20180000001 and name X Y Z is submitting):
o A directory named 20180000001_X_Z is created
o All the solutions files along with a make file are created as part of the assignment. For example:
Page 1 of 2

o Pack this directory into a zip file named 20180000001_X_Z.zip
o When unpacked as above in Ubuntu (version provided in class) it should allow executing the following commands in a shell:
▪ “$make clean” removes everything except makefile, source code (.c and .h) and other resource files (if any) – all compiling results and intermediate files should be removed.
▪ “$make compile” should compile the code.
▪ “$make run” should run the code along with any parameters needed.
Page 2 of 2

Reviews

There are no reviews yet.

Be the first to review “CSE102 – Computer Programming with C Assignment #0 (Solution)”

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