Quick question: what does "if(c == '\n') mean in this context? Is it just using '\n' as a reference for a numeric value within ASCII? which in that case would be 10, so if 10 is entered, this is when nl increments up one?
{
int c, nl;
nl = 0;
while ((c = getchar()) != EOF)
if (c == '\n')
++nl;
printf("%d\n", nl);
}