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


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

Login to reply

👍x1
helpful
4:59pm Wed 14th Aug, Joshua N.
✅ content verified by our teaching staff  

ANONYMOUS wrote:

for this question in the sample test (14) Consider the following array declaration: int arr[20]; Which of the following code fragments moves all the integers in index positions 1 through 5 inclusive one place to the left to index positions 0 through 4 inclusive?

does 'one place to the left' mean -1?

One place to the left means: index - 1.

e.g. If an integer is at index 3 it will be at index 2 after the code runs. Likewise, if an integer is at index 1, then after the code runs it will be at index 0.

I hope that makes sense.

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