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 94 other people reading this forum.


 UWA week 37 (2nd semester, week 7) ↓
SVG not supported

Login to reply

👍?
helpful
8:40pm Wed 11th Sep, Joshua N.

"Zexu Ding" [email protected] wrote:

Do I need to consider the possible mismatched brackets? Like:

func((1+2, foo)

You wouldn't need to check mismatched brackets as Chris said expression checking isn't necessary.

Am I supposed to use %d or %f according to the different return values of the expression?

Yes, if 24.00, print as 24. if 24.5, print as 24.500000

And what is the maximum recursive depth of the expression?

print (  (func(1, (2 + 3) * 2.9, func1(2) + func2())) )
printf("%d", func(1, (2 + 3) * 2.9, func1(2) + func2()));

Not sure but better to be safe than sorry and assume it can be as deep as it is in C.

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