Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (13 sloc) 0.209 kb
// Section 1.5.3 Example 1 from page 19
#include <stdio.h>
// Count lines in input
main() {
int c, nl;
nl = 0;
while ((c = getchar()) != EOF) {
if (c == '\n') {
++nl;
}
}
printf("%d\n", nl);
}
Jump to Line
Something went wrong with that request. Please try again.