It's UWAweek 48


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

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

Login to reply


"Juliana Salazar Franco" <23*6*4*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> For the last question of the refresher tasks I have made it so that the 2D array that is pulled by the c file is randomised 10x20 per the question description, nested a loop so that it checks for rows and column to find the largest number and then once that is done move onto the next; giving the "second-largest number" but I think my syntax is not correct for C script, and I was wondering if anyone had a website or specific example that I could look at for this problem.
Hello Juliana, I've found it a bit difficult to understand your question, so there may be some assumptions/misunderstandings in my reply. Firstly, to help understanding, let's not say "C script". The C source code is text to be (correctly) compiled before it can be executed. We use the word 'script' when referring to code that is interpreted in a single step, so it's more suited to Python scripts, and shellscripts. Because we have tools like the C compiler, we don't need to be concerned as to whether our syntax is correct - the compiler will report errors of incorrect syntax. Your problem/misunderstanding is more likely coming from the approach to the task. Have you first tried solving the problem in your first programming language - either Java or Python? The page [CITS2002] may provide some help with nested loops and 2D arrays 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  1:17AM Sep 14 2022
Privacy policy