Explanatory Question
Find the errors in the given program segment and re-write the statements correctly to assign values to an integer array.
int a = new int (5);
for (int i=0; i<=5; i++) a[i]=i;
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.