Advertisements
Advertisements
Question
Some of the code given below contains errors. Identify the error and correct it. Write the output of the correct/corrected code.
int ad[] = {25, 5, 45, 4, 92, 2, 29, 9};
int ap = (ad[0] + ad[7]) /ad[5];
System.out.print(" Result =" + ap);Very Short Answer
Advertisements
Solution
No Error: Output : Result = 17
shaalaa.com
Is there an error in this question or solution?
Chapter 7: Arrays - One Dimension - Exercises [Page 174]
