Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!ucsd!sdcc6!sdcc10!cs163wcr From: cs163wcr@sdcc10.ucsd.edu (C Code. C Code run.) Newsgroups: comp.lang.c Subject: Possible scanf bug? Message-ID: <16134@sdcc6.ucsd.edu> Date: 29 Jan 91 21:08:46 GMT Sender: news@sdcc6.ucsd.edu Organization: University of California, San Diego Lines: 11 Nntp-Posting-Host: sdcc10.ucsd.edu Is this a bug, or am I just using scanf wrong? I'm trying to make scanf read a line that's ended with newline. char buffer[100]; /* Line won't be over 80, but so what */ scanf ("%[^\n]%*c",buffer); If it reads an empty line, buffer isn't changed at all! It should make buffer the null string! Right? Steve Boswell whatis@ucsd.edu