It's UWAweek 45 (2nd semester, 2nd exam week)

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 821 articles.
Currently 9 other people reading this forum.


 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
6:50pm Thu 3rd Oct, Joshua N.

"Joshua Noble" <22*6*9*8@s*u*e*t*u*a*e*u*a*> wrote:
> "Joshua Noble" <22*6*9*8@s*u*e*t*u*a*e*u*a*> wrote: > > > "Samay Gupta" <23*6*5*8@s*u*e*t*u*a*e*u*a*> wrote: > > > > > So, if any process request comes other than 0 to 3 in the input string, I am skipping that process and processing rest of the processes as required without printing any error > > > > If you encountered a number outside of 0-3 then you would assume the file is corrupted and you shouldn't continue reading. So best practice is to print an error message then call exit(EXIT_FAILURE).
Actually the best practice is to never call "exit" because it doesn't end the program "gracefully". The best practice is to return EXIT_FAILURE (1) in main. If you are interested.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy