If Int X = 4, 3,7, 8, 9,10; What Are the Values of P and Q ? (I) P = X.Length (Ii) Q = X2+ X5 * X1
Advertisements
Question
If int x [ ] = { 4, 3,7, 8, 9,10}; what are the values of p and q ?
(i) p = x.length
(ii) q = x[2] + x[5] * x[1]
Answer in Brief
Short/Brief Note
Advertisements
Solution
(i)
Value of P will be 6.
(ii)
q = x[2] + x[5] * x[1]
= 7 + 10 * 3
= 7 + 30 = 37
value of q is 37.
shaalaa.com
Is there an error in this question or solution?
