Unlike strings, the entries of arrays are mutable and can be changed freely, using indices and the bracket notation:
int ourArray[] = {50, 40, 30};
ourArray[0] = 15;
ourArray[1] = -1;
// ourArray is now {15, -1, 30}
Assignment
Follow the Coding Tutorial and let's play with some arrays.
Hint
Look at the examples above if you get stuck.
Free plan: 30 tutor messages. PRO is unlimited.
Saved
Ctrl + Enter to check
