![]() |
.. (לתיקייה המכילה) | |
In section 4 what should we print "I don't recognize this option" if a Q is encountered? | |
No, Q is missing from the description. |
In section 7.4 what should we do if an invalid command was entered? | |
Return to section 7.2. |
Can we use the "exit" function in this exercise? | |
Yes but it is not recommended. return; from main is much more neat and leads to better and more maintainable code. (why?) |
In section 7.2, can we assume that E,M,U are the only possible inputs? | |
Yes. |
Can we #include stdlib.h for exit? | |
Yes (how would you use it otherwise?), but its use is strongly discouraged |
Can I use pointers? | |
Pointers are not needed to solve this assignment. |
Tests failed on csm, but everything works fine if I run locally on my machine (redirection or manually). What could be the problem? | |
There are two kind of problems: first, accessing arrays out-of-bounds. CodeBlocks let you do this, linux-gcc will not [tests crashed, and possibly no csm output] second, '\n' on Windows machines is different from '\n' (new line) on linux. Try to not read those characters at all. If you were asked to read numbers - do only this. Do not try to consume all those white spaces. |