24 int main(
int argc,
char** argv)
26 const char* usage =
"usage: %s filename\n";
32 fprintf(stderr, usage, argv[0]);
38 assert(
sizeof(
int) == 4);
45 fprintf(stderr,
"Total numbers read = %zu\n",
nums_used(nsp));
Data structure to store numbers.
int main(int argc, char **argv)
Program to read a file with binary positive 32 bit integers, sort the numbers and print them sorted...
void nums_free(NUMS *nsp)
Free NUMS data structure.
Appfs Exercise 1: Number storage and sorting subroutines.
NUMS * nums_read(const char *filename)
Read numbers into data structure.
void nums_print(const NUMS *nsp)
Sort and print all numbers in the NUMS structure.
size_t nums_used(const NUMS *nsp)
Return count of numbers in NUMS structure.