Alex Rivera | Logout

Is stdin limited in length?

Asked 2010-03-12T02:39:02.530
9

Are there any stdin input length limitations (in amount of input or input speed)?

Edit
Report

1 Answer

2

According to everyone's other favorite Q&A site:

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 !) :

for (;;) {
    int c = getc(stdin);
    if (c == EOF) { break; }
    putc(c, stdout);
}

and see whether it has the same restriction.

answered 2010-03-12T02:50:30.390

Your Answer