cProgHW4Part1

cProgHW4Part1 - C PROGRAMMING HOMEWORK 4 PART 1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: C PROGRAMMING HOMEWORK 4 PART 1 /******************* Homework Assignment 4 Part 1 By: /******************/ #include <stdio.h> #include <stdlib.h> #define INPUT_FILE "inputfile.in" #define OPUT_FILE "outputfile.out" typedef char *string; typedef struct person { char name[14]; int age; double height; } person; void sortnmdo (person*, int , int ); void sortnmrdo(person*, int , int ); void sortageup(person*, int , int ); void sorthgtup(person*, int , int ); void printfunc(person*, int , int ); void outputfun(person*, int , int ); int main() { FILE *infile; infile= fopen(INPUT_FILE, "r"); if (infile == NULL) { printf("Unable to open input file!\n" INPUT_FILE); printf("Terminating program...\n"); exit(1); } person *indxnmdo; //pointer arrays declarations person *indxnmrdo; person *indxageup; person *indxhgtup; person club[20], index; int counter,i; ///////////////NEED TO FIX COUNT//////////////////// for (i=0; i<count; i++) { fscanf(infile, "%s %i %lg", &club[i].name, &club[i].age, &club[i].height); index[i]=&club[i]; } /////////////pass each array to output file/////////////////...
View Full Document

Page1 / 4

cProgHW4Part1 - C PROGRAMMING HOMEWORK 4 PART 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online