lab09.2 - exit(1) } while( !feof(in)){ fscanf(in,...

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> /* *A program that */ int main(){ int count, i = 0 int array[100] = {0} FILE* in = fopen("data", "r") if(in == NULL){ printf("Error opening file")
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: exit(1) } while( !feof(in)){ fscanf(in, &quot;%d&quot;, &amp;i) array[i]++ } for(count = 0 count &lt; 100 count++){ printf(&quot;%3d - &quot;, count) printf(&quot;%3d\n&quot;, array[count]) } return (0) }...
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