Computer Science, asked by kaminidevimalda, 5 hours ago

2. int a[ ] ={2,4,6,8,10};
a[0]=23,
a[3]=a[1]
int ca
a[O]+a[1]
System.out.println("Sum = "+c);
please explain in easy words I will give 5 star​

Answers

Answered by soumyabratamukherjee
1

See this is an array of length 5.

the first subscript or index of array carries 23. the fourth subscript is equal to the second subscript. though a[0]= 2 but now it has value 23. so sum is 23+4=27.

Similar questions