Question: Assume an integer array a contains 500 integers and we would like to write the code for calculating the largest integer in this array. Following
Assume an integer array a contains 500 integers and we would like to write the code for calculating the largest integer in this array. Following is code we come out with one line is missing at the location indicated: (missing line) for(int i=0;i<500;i++){ if(a[i]>m) m=a[i]; } Which one of followings is the line we missed? O int m=a[0]; int m; O int m=0, O int m=a[1]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
