C printf statments not executing after reading in input

Not particularly a .net question but c, not exactly sure where is should go. Anyway, I am following some lessons in a book and I can not seem to get the statements following the while loop to execute. It seems like once I hit enter the program runs the while loop and ignores everything below it. Maybe this is a system issue? – I’m on mac os x 10.5 leopard with the dev tools from apple.

thanks


#include <stdio.h>

#define IN 1
#define OUT 0

/* count digits, white space and others */
main()
{

	int c, i, nwhite, nother;
	int ndigit[10];

	nwhite = nother = 0;

	for(i = 0;i < 10; ++i) {
		ndigit[i] = 0;
	}

	while( (c = getchar()) != EOF ) {

		if(c >= '0' && c <= '9') {
			++ndigit[c - '0'];
		} else if(c == ' ' || c == '\
' || c == '\	') {
			++nwhite;
		} else {
			++nother;
		}

	}

	printf("digits =");

	for(i = 0;i < 10; ++i) {
		printf(" %d",ndigit[i]);
	}

	printf(", white space = %d, other = %d\
", nwhite, nother);

	return 0;

}

Finally was able to least isolate this issue. Seems like it is a bug in Eclipse, which I am using to run the program. Now just to figure out how to get around it.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=159803

If anyone knows how to signal the end of a file in the eclipse environment it would be helpful. Looks like for now I will be using the terminal.