Lab09.6 - for(count = 0 count< 1000000 count linSearch(array SIZE(rand 300 return(0 int linSearch(int input int size int key int i = 0

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #include <stdio.h> #include <stdlib.h> #include <time.h> #define SIZE 300 /* */ int linSearch(int input[], int size, int key) int main(){ srand(time(NULL)) int array[SIZE] int count for(count = 0 count < SIZE count++) array[count] = count
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: for(count = 0 count < 1000000 count++) linSearch(array, SIZE, (rand() % 300)) return (0) } int linSearch(int input, int size, int key){ int i = 0 if(key >= size) return -1 while(input[i] != key) i++ return i }...
View Full Document

This lab report was uploaded on 04/06/2008 for the course CISC 105 taught by Professor Mcgeary during the Spring '08 term at University of Delaware.

Ask a homework question - tutors are online