Classwork 17
Logistics
- Due: Wednesday, October 16th AoE.
- Submission instructions: make sure that the required file (
point.c
) is in yourcsci112_fall2024/classwork/week9/wed/
directory. - Deadline reminder: after the deadline passes, you cannot earn any points for this assignment.
Learning outcomes
- Practice passing structs by reference
Assignment
- Log in to the server.
- From your home directory, navigate to
/csci112_fall2024/classwork/week9/wed/
, creating directoriesweek9
andwed
if necessary. - Copy the
point.c
file from/public/classwork/week9/wed
to your directory.
Fill in the missing function change_x
so that it changes the value of the x
field in a point that is passed in. Make sure that you define the function to
match the calls in change_x
in main
.
After you add the function, compiling and running your program should look like this:
[g73x595@csci112 wed]$ gcc point.c -Wall
[g73x595@csci112 wed]$ ./a.out
(3.14,3.56)
(3.14,-10.46)
Autograder
You can run the autograder by running
/public/classwork/week9/wed/autograder.sh
The file autograder.txt
will be created with your score.
Grading turnaround
The autograder will be run at 6am to calculate final scores. Scores will be uploaded to D2L by the next class period.