array.c
//does linear search for param x in array at param ap
//returns index of x in found; returns -1 if not found
does linear search for param x in array at param ap
returns index of x in found; returns -1 if not found
does linear search for param x in array at param ap returns index of x in found ; returns - 1 if not found
int array_lsearch(array_t* ap, int x) {
	int i;
	for(i=0; i<ap->length; i++) {
		if( ap->array[i] == x ) {
			return(i);
		}
	}
	return(-1);
}
int array_lsearch ( array_t * ap , int x ) { int i ; for ( i = 0 ; i < ap -> length ; i ++ ) { if ( ap -> array [ i ] == x ) { return ( i ) ; } } return ( -1 ) ; }
does linear search for param x in array at param ap
returns index of x in found; returns -1 if not found
does linear search for param x in array at param ap returns index of x in found ; returns - 1 if not found