Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!news.cs.indiana.edu!ariel.unm.edu!nmsu!opus!newberry From: newberry@nmsu.edu (Jeff Newberry) Newsgroups: comp.lang.c Subject: Re: fscanf & EOF Message-ID: Date: 11 Feb 91 18:47:03 GMT References: <2145@novavax.UUCP> Sender: news@NMSU.Edu Organization: Computing Research Lab Lines: 17 In-reply-to: gls@novavax.UUCP's message of 11 Feb 91 15:11:42 GMT >Would some kind soul care to illuminate for me why this code dumps core? > while ( (fscanf(input,"%8s%1s%2s", part_number, delimiter, > part_class)) && (feof(input)) ) How are the arguments defined? If they are all defined as arrays of characters, then I don't know why it core dumps. If "delimiter" is defined as a charater, then you need "&delimiter". Also, I assume you want to put (!feof(input))? I hope this helps. Jeff Newberry newberry%nmsu.edu