runtime error

this code is giving runtime error.. why?
1
2
3
4
5
6
7
8
9
10
#include<stdio.h>
int main()
{
    int i;
    for(i=0;i<100000;i++)
    {
        printf("s\n");
    }
    return 0;
}
works fine on my pc.

whats the error you get?
http://ideone.com/Xrk8hV

see this link
Went to that link:

I think the problem is a limitation of the website - rather than the code itself.


(EDIT: You are trying with an input of 100000 (hundred thousand) - it will run OK
with an input of 10 000 (ten thousand) - which is why I think it is
due to a limitation of the website - in that it can only handle so much output - rather than the source code)
Last edited on
Topic archived. No new replies allowed.