Sorting/Ints/fileLoad.c File Reference

Driver that sorts integer array loaded up from disk The file to be loaded is a sequence of integers, one per line. More...

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

Defines

#define LEN   32
 maximum size of each integer to be read.

Functions

void sort (int *ar, int n)
 sort n numbers in array.
int main (int argc, char **argv)
 Launch the sorting application.


Detailed Description

Driver that sorts integer array loaded up from disk The file to be loaded is a sequence of integers, one per line.

The first line contains the number of integers to be found in the file. The remaining lines contain these integer values, one per line. Once the file is loaded into memory, it is sorted, and validated that the sort properly ordered the elements.

Author:
George Heineman
Date:
6/15/08

Define Documentation

#define LEN   32

maximum size of each integer to be read.


Function Documentation

int main ( int  argc,
char **  argv 
)

Launch the sorting application.

void sort ( int *  ar,
int  n 
)

sort n numbers in array.

Algorithm Development Kit 1.0