Example Questions
for CSCI 159, Fall 2024
Computer Science I
Write a recursive function that computes and returns the
value of Fib(n), where n is a non-negative integer.
The prototype for the function would likely be this:
int Fib(int n);
int find( float arr[], int left, int right, float key);
Assume that the function is never called with right > size-1, where size is the
size of the array. If the key is not in the array,
the returned value should be -1.
The prototype can be this:
void printDivisors( int n);
Write a iterative function that does the same thing.
Useful Links:
Course Outline
Homework and Assignments
Gara Pruesse's Homepage
Computing Science Homepage
Vancouver Island University Homepage