C fixing errors

  • Due No due date
  • Points 70
  • Questions 70
  • Time Limit None
  • Allowed Attempts Unlimited

Instructions

Questions to check that you are able to identify and fix errors in C programs. Note that the point values on the questions are not important. Note that the reason for this quiz is to help build your debugging skills. The points don’t really matter; rather the goal is to give you practice building your debugging skills. So you should rely on others as little as possible; or get help to get you started and then start figuring out as many as you can on your own. The programs that you need to fix for this quiz are at this link: https://cs.indstate.edu/learn/C/fix_errors

Advice to get you started. Get the files into your account on the CS server. You can do this by checking out the assignment if it is part of your course, or by typing: cp -R /net/web/learn/C/fix_errors ~/C_fix_errors. Once you have the files copied, compile the first one with gcc: gcc hello1.c. If it has any warnings or errors, fix them, but also copy/paste the warning/error messages (the quiz will ask for these). Once it runs, run it (./a.out, or it may require input as command-line arguments or from standard input - see the file’s comments). Check the comments in the file about what it is supposed to do, and determine if it is giving correct output or not. Make a note of what you did to fix the program (the quiz will ask for this).

Make sure to keep track of your work so that you will be able to copy/paste into the Canvas quiz when you are finished. There will be no time limit on the quiz, but it does have to be done all at once - so should only be done after you are finished.

You should be able to get a 100% on this quiz as you get comfortable with C. If you need to refresh your memory on any topics, see the following for links to resources: C Starting.