Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

pleaase haa-aalp

Name: Anonymous 2010-01-16 9:42

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;
nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}

what the shit is this supposed to print anything?

sorry, I am a complete beginner

Name: Anonymous 2010-01-16 9:46

Just ran it, it works. Not sure what the problem is. Remember if you run it from a terminal, it's waiting to read on stdin, and ctrl+d is eof.

Name: Anonymous 2010-01-16 9:54

Please use the [code] tags!

Name: Anonymous 2010-01-16 10:30

>>2
I ran from terminal. What does
>it's waiting to read on stdin
mean to me?
>>3
Apologies.
test

Name: Anonymous 2010-01-16 10:38

>>4
Nevermind, I think I've worked that out. Much obliged.

Name: Anonymous 2010-12-17 1:32

Xarn is a bad boyfriend

Don't change these.
Name: Email:
Entire Thread Thread List