Computer Applications

If int x[] = { 4, 3, 7, 8, 9, 10}; what are the values of p and q ?

  1. p = x.length
  2. q = x[2] + x[5] * x[1]

Java Arrays

ICSE 2016

27 Likes

Answer

  1. 6
  2. q = x[2] + x[5] * x[1]
    q = 7 + 10 * 3
    q = 7 + 30
    q = 37

Answered By

16 Likes


Related Questions