An array of int s named a has been declared with 12 elements . The integer variable k holds a value between 2 and 8. Assign 22 to the element just before a[k].

An array of int s named a has been declared with 12 elements . The integer variable k holds a value between 2 and 8. Assign 22 to the element just before a[k].

LANGUAGE: JAVA

CHALLENGE:

An array of int s named a has been declared with 12 elements . The integer variable k holds a value between 2 and 8. Assign 22 to the element just before a[k].

SOLUTION:

a[k-1] = 22;

Add comment