What is the effect of the following code fragment?
```
c = -1;
for ( int i = MAX_SIZE - 1; i >= 0; --i )
if ( list1[i] == t )
c = i;
```
a. calculates 1 less than the sum of the occurrences of the value of t in list1
b. finds the subscript of the first occurrence of the value of t in list1 (or –1 if it is not found )
c. counts the number of occurrences of –1 in list1
d. counts the number of occurrences of the value of c in list1
b. finds the subscript of the first occurrence of the value of t in list1 (or –1 if it is not found )
You might also like to view...
If you do not declare an access specification, the default for members of a class is
a. inline b. private c. public d. global e. None of these
In the clock application, the entire nested loop must be contained within the outer loop in order to work properly.
Answer the following statement true (T) or false (F)