Hello everyone so I have a quick question, my code is supposed to only take 6 character values so I used an array to limit it to 6 but whenever I run it, it gives me an error. Could anyone help shed some light on this? :(
Keep in mind that an array of size 6 begins at index 0 and ends at index 5.
Line 12 attempts to access the array singleChar at index 6, which is out of bounds. This can cause the program to crash with an out of bounds error and should be avoided.