I don't know if your program will wprk as intended but you'll want to change some of your conditional statements

if((fn1 = fopen(argv[1] ,"r")) = NULL)

to


if((fn1 = fopen(argv[1] ,"r")) == NULL)