Simple C Question (was: down)

Doug Gwyn gwyn at smoke.BRL.MIL
Tue Dec 13 03:32:41 AEST 1988


In article <192 at broadway.UUCP> furlani at broadway.UUCP (John L. Furlani) writes:
-    This snippit of code should do it.  It will count the newlines, but it
-won't count the returns.  
-        while ((c = getc(infile)) != EOF)
-            if (c == '\r') chcnt++;

Oh, really?



More information about the Comp.lang.c mailing list