on 36. line you have fp = open(argv[2], "r"); it should be fp = fopen(argv[2], "r");
Else you have declared variable char line[MAXSIZE]; but you don't use it in your code.
thanatosys commented: great help on a simple problem. +1
WaltP commented: A WHILE loop is not a POSTtest loop +15