i think the program is executing and exiting so quick that you can't see the output .. try this:
Code:
#include <stdio.h>
/*count chars in input, 1st version*/
main ()
{
long nc;
nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
printf("\n\n Press any key to exit.");
getchar();
}
i'm sorta a n00b myself, but i think this will do it.