I don't program in linux, but I suspect that you're just asking for too much memory, on the stack.
That's a truck load of bytes there, partner!
Try it with 1,000 and see what happens.
Segmentation fault is an "Oh ........, my engine broke the crank", kind of error. Usually occurs when something in your program (like a pointer), refers to something outside of it's allocated memory space.
If you need more memory than you can get this way, try making it a global (before main()). If that still isn't enough (and it won't be enough for this amount), then you'll need to malloc() that memory from the heap. The memory must not only be available, in the quantity you're requesting, but it must also be available in one contiguous "chunk".
For your program code, I have two suggestions:
1) Use spaces instead of tabs - tabs don't always work with the forum software, just right. Two to four spaces, is ideal for each level of indentation.
2) Use indentation, always. Don't leave home without it, buddy!
Good on ya, for using code tags around your program - you're ahead of the curve, already.