What does this means ? Console.writeline("index out of bounds"); means? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What does this means ? Console.writeline("index out of bounds"); means?

What is this line or coding saying?

14th May 2020, 10:30 PM
Life
Life - avatar
2 Answers
+ 3
"Index out of bounds" as an error would typically indicate that you've gone beyond the limits of an array. For instance; int arr[10]; // create an int array with 10 elements .... .... Console.Write(arr[10]); // produces an error. There is no index 10 in this array. Arrays are zero based so an array with 10 elements would have indices that range from 0-9, not 10.
14th May 2020, 11:26 PM
ChaoticDawg
ChaoticDawg - avatar
+ 2
that line simply outputs the string parameter to console. when you run that code, you will view that string in the command prompt. like this: index out of bounds
14th May 2020, 11:15 PM
Sebastian Pacurar
Sebastian Pacurar - avatar