cProgHW4Part2 - printf"Terminating program\n"...

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

View Full Document Right Arrow Icon
C PROGRAMMING HOMEWORK 4 PART 2 /******************* Homework Assignment 4 Part 2 By: /******************/ #include <stdio.h> #include <stdlib.h> #include <string.h> #define INPUT_FILE "inputfile.in" #define OPUT_FILE "outputfile.out" typedef char *string; typedef char wordlist; int main() { FILE *infile; infile= fopen(INPUT_FILE, "r"); if (infile == NULL) { printf("Cannot open file!\n" INPUT_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: printf("Terminating program. ..\n"); exit(1); } wordlist wordset[50][5]; int counter, inputvar; for (counter=0; counter<10; counter++) //to fill array strings { wordlist store; fscanf(infile, "%s", &store); while (1==fscanf(infile, "%i", &store)); wordset[counter]=store; inputvar=counter; } system("PAUSE"); return 0; }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online