lab09.5 - scanf"%d"&key printf"index of...

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> #define SIZE 100 /* *A program that */ int linSearch(int input[], int size, int key) int main(){ int array[SIZE] int count, key for(count = 0 count < SIZE count++) array[count] = count printf("Enter a integer key: ")
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: scanf("%d", &key) printf("index of key is: %d\n", linSearch(array, SIZE, key)) 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