Professional Documents
Culture Documents
CS 100 - Computational Problem Solving: Fall 2017
CS 100 - Computational Problem Solving: Fall 2017
Fall 2017
Quiz-6
Name: ___________________________________________
a. Write array function that returns the smallest-element in the array. [7]
Example 1 Example 2
5 36 12 27 2 32 29 28 35 72 31 77 68 95 72 87 74 68 85 35
2 31
}
b. What is wrong with the following loop? Explain two ways of fixing the error.
[3]
int values[10];
{
values[i] = i * i;
}