#include #define N 300 int main(int argc, char **argv) { int i, target; /*local variables*/ int b[N]; /*the entire array of integers*/ FILE *sourceFile; FILE *destinationFile; /* File b.data has the target value on the first line */ /* The remaining 300 lines of b.data have the values for the b array */ sourceFile = fopen("b.data", "r"); /* File found.data will contain the indices of b where the target is */ destinationFile = fopen("found.data", "w"); if(sourceFile==NULL) { printf("Error: can't access file.c.\n"); return 1; } else if(destinationFile==NULL) { printf("Error: can't create file for writing.\n"); return 1; } else { /* Read in the target */ fscanf(sourceFile,"%d", &target); /* Read in b array */ for (i=0; i