#include #define MAXSIZE 100 typedef struct { unsigned int size; int arr[MAXSIZE]; } SortedArray; /* print out the contents of "s", for debugging */ void SA_Print ( SortedArray s ) { int i; for ( i=0; i val ) { return MAXSIZE+1; } } return MAXSIZE+1; } int main () { SortedArray s; /* initialize the SortedArray by hand to we can test. */ s.size = 2; s.arr[0] = 10; s.arr[1] = 20; /* testing... */ SA_Print(s); printf("%u\n", SA_Search(s, 15) ); return 0; }