Hi Pavan, Put this in your code: if(outputs1 == NULL) fprintf(stderr, "outputs1 is NULL\n"); if(outputs2 == NULL) fprintf(stderr, "outputs2 is NULL\n"); if(outputs3 == NULL) fprintf(stderr, "outputs3 is NULL\n"); if(outputs4 == NULL) fprintf(stderr, "outputs4 is NULL\n"); if(outputs5 == NULL) fprintf(stderr, "outputs5 is NULL\n"); if(outputs6 == NULL) fprintf(stderr, "outputs6 is NULL\n"); if(outputs7 == NULL) fprintf(stderr, "outputs7 is NULL\n"); Do these statements just before your: fprintf(outputs1,"\t%4.1f\t %d\n",((double)m/10),sh1); HTH, --Eljay