... except I'm not using a stdin stream, try my example above or this simplier test below, and then let me know what values you get:
Code:
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
int ch;
/* change as apporpiate to system */
FILE *streamp = popen("dir /b", "r");
/* print characters in stream */
/* shows that stream is not empty */
while((ch=fgetc(streamp)) != EOF)
printf("%c", ch);
/* check status of stream */
printf("\nEOF?: %d", feof(streamp));
/* reset position marker */
printf("\nfseek succeed?: %d", fseek(streamp, 0, SEEK_SET));
printf("\nPosition?: %d", ftell(streamp));
printf("\nError?: %d", ferror(streamp));
printf("\nEOF?: %d\n", feof(streamp));
getch();
/* if zero's above, this should fail */
if((ch=fgetc(streamp)) == EOF)
printf("STILL @ EOF", ch);
}