Title: What does the following code do? Assume list is an array of int values, temp is some previously ini Post by: Izaganag on Sep 21, 2015 What does the following code do? Assume list is an array of int values, temp is some previously initialized int value, and c is an int initialized to 0.
for (int j = 0; j < list.length; j++) if (list[j] < temp) c++; A) It counts the number of elements equal to the smallest value in list B) It finds the largest value and stores it in temp C) It counts the number of elements in list that are less than temp D) It sorts the values in list to be in ascending order E) It finds the smallest value and stores it in temp Title: Re: What does the following code do? Assume list is an array of int values, temp is some previously Post by: eurocoin on Sep 21, 2015 C
Title: Re: What does the following code do? Assume list is an array of int values, temp is some previously ini Post by: Izaganag on Sep 28, 2015 I regret taking this computer science course. Should just stick to history :P Thanks for your help.
|