while(ch!=EOF && j<3) { while((ch=fgetc(stream1))!='\n') { str[i++]=ch; } str[i]=0; Big d[j](str); i=0; j++; }