There shouldn't be a limit to the stream size (whether that's stdin or another). What you might want to check however, is where you store these characters ... Is there enough space to store them all ?
Try just code like this (without storing !) :
int c = 0;
do {
c = getc(stdin);
printf("%c", (char) c);
} while (c != EOF); /* <--- or another terminator value */
and see whether it has the same restriction.
Can you show the relevant code ?
Main Topics
Browse All Topics





by: etjuseraskqPosted on 2008-02-19 at 05:11:02ID: 20927899
Need to know if the standard input (stdin) stream size can be increased thru the C program. I suspect the limit is 512 characters max that can be read into at one time.