Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!texbell!uhnix1!csuna.cs.uh.edu!jsmng From: jsmng@csuna.cs.uh.edu Newsgroups: comp.lang.c Subject: Re: scanf doesn't work for variables of type double Message-ID: <13278@uhnix1.uh.edu> Date: 18 Sep 89 20:05:55 GMT Sender: nntppost@uhnix1.uh.edu Reply-To: jsmng@csuna.cs.uh.edu () Organization: University of Houston Lines: 9 I posted a question about scanf last week. I could not scanf a double variable using %f. Thanks to many readers' contribution (There were too many to list out all names). My mistake was not reading my old K&R edition careful enough. Using %lf and %F would have worked. Printf accepts %f for float and double but not scanf. Mainly because the float parameters passed by value to printf will be converted to double. Scanf is passed by reference, so I have to do it right. James