- What is debugging
- What are some methods of debugging manually
- How to read the error messages
- In most projects, we often give you only one main file to test with. For example, this main file is a test for a postitive_or_negative() function similar to the one you worked with in an earlier C project:
You only need to upload 0-main.c
and main.h
for this task. We will provide our own positive_or_negative()
function.
You are not allowed to add or remove lines of code, you may change only one line in this task.
Mode: mandatory
- Copy this main file. Comment out (don’t delete it!) the part of the code that is causing the output to go into an infinite loop.
Don’t add or remove any lines of code, as we will be checking your line count. You are only allowed to comment out existing code.
You do not have to compile with -Wall -Werror -Wextra -pedantic
for this task.
Mode: mandatory
File: 1-main.c
- This program prints the largest of three integers.
Line count will not be checked for this task.
Mode: mandatory
File: 2-largest_number.c, main.h
- This program converts a date to the day of year and determines how many days are left in the year, taking leap year into consideration.
Line count will not be checked for this task.
You can assume that all test cases have valid months (i.e. the value of month
will never be less than 1
or greater than 12
) and valid days (i.e. the value of day
will never be less than 1
or greater than 31
).
You can assume that all test cases have valid month/day combinations (i.e. there will never be a June 31st or November 31st, etc.), but not all month/day/year combinations are valid (i.e. February 29, 1991 or February 29, 2427).
Mode: mandatory
File: 3-print_remaining_days.c, main.h