It's UWAweek 47

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 828 articles.
Currently 72 other people reading this forum.


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported

Login to reply

👍?
helpful
12:48pm Mon 26th Aug, Chenjun H.

Hi, Just had a few questions about the assignment.

First, what should happen if divide by zero occurs, are we expected to do static analysis at compile time, throw an error at run time, or is it UB?

Second, in example 5 a function call is done using printsum 12 6, without any brackets or separators in the function call, whilst all other examples use function(args) as the syntax. Should we be able to parse both?

Also, with respect to command line arguments, should our program check if the number of arguments passed to the program is sufficient and print to stderr like follows

if (argcount < 2) {
        fprintf(stderr, "%s: program expected at least 1 argument",
                argvalue[0]);
        exit(EXIT_FAILURE);
    }

Thanks in advance.

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