APPFS
Advanced practical programming for scientists
|
Appfs Exercise 1: use of subroutines. More...
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
Program to read a file with binary positive 32 bit integers, sort the numbers and print them sorted. More... | |
gcc -O3 -Wall -std=c99 -o ex1b3 ex1b3.c nums.c
Use stream file for input
Definition in file ex1b3.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
Actually, the numbers are not sorted. There is an array with one bit for each possible number. Upon reading the respective bit is set for the number recognized. At the end the array is scanned in order and the numbers present are printed.
argv | [1] name of file to read |
Definition at line 24 of file ex1b3.c.