English

Give the output of the following program snippet: int a[] = new int [5]; a[0] = 4; a[1] = 8; a[2] = 7; a[3] = 12; a[4] = 3; System.out.println(a[2 + 1]); - Computer Applications

Advertisements
Advertisements

Question

Give the output of the following program snippet:

int a[] = new int [5];
a[0] = 4; a[1] = 8; a[2] = 7; a[3] = 12; a[4] = 3;
System.out.println(a[2 + 1]);
One Word/Term Answer

Solution

12

shaalaa.com
  Is there an error in this question or solution?
Chapter 3: Arrays (Single Dimensional and Double Dimensional) - EXERCISES [Page 239]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 3 Arrays (Single Dimensional and Double Dimensional)
EXERCISES | Q III. 3. | Page 239
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×
Our website is made possible by ad-free subscriptions or displaying online advertisements to our visitors.
If you don't like ads you can support us by buying an ad-free subscription or please consider supporting us by disabling your ad blocker. Thank you.