Logistics

  • Due: Wednesday, March 20th AoE.
  • Submission instructions: make sure that the required file (point.c) is in your csci112_spring2024/classwork/week10/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_spring2024/classwork/week10/wed/, creating directories week10 and wed if necessary.
  • Copy the point.c file from /public/classwork/week10/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/week10/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.