|.. (לתיקייה המכילה) .. (parent folder) .. (родительский каталог) .. (المجلد المحتوي)|
Q: The input matches the output on my machine, but the test fails on the self-test website. What should I do?
1. Check that your output and the expected output really matches. Even an additional newline at the end of the file is considered different.
Next, you should check for non-portable code, i.e. code that works on Windows but not on Linux.
2. Ensure that all your variables are initialized when they are declared.
3. To get characters from the input, ensure that you're using scanf(" %c",&c); Notice the space before the %c. You're not allowed to use getchar() unless strictly requested.
3. Ensure that every access to an array is within the array's size. If the array size is N, the accessed index must be between 0 and N-1.
Use prints to check that the above holds.
If non of the above works:
Check again that all the above are correct, but the program fails on the self-check website.
1. Ensure that the code is written correctly: indentation, meaningful variable names, comments, etc. Note: we won't check your code if it doesn't follow these rules.
2. Send a question to your TA.
Q: The program works OK on my machine and it produces the correct output in the self-test website.
|Check that your return value (from main) is always 0. Any non-zero value indicates an error. |
Also, do not use the exit() function unless an error occurred.