I would like to rewrite the first code sample into the form of the second sample and still get the same results. How would I do that?
Code:while(fscanf(fp,"%s %s %s %s",info[numList].fname, info[numList].lname,info[numList].phone, info[numList].address)!= EOF || numList > MAX) { numList++; }
Code:while(what condition?) { fscanf(fp,"%s",[numList].fname); fscanf(fp,"%s",info[numList].lname); fscanf(fp,"%s",info[numList].phone); fscanf(fp,"%s",info[numList].address) numList++; }