When I compiled this simple C code it\'s fine but after uncommenting the line it shows segmentation fault. I don\'t know what\'s wrong with this. Please help.
Variables allocated inside a function are put on the stack, which has a limited size. You can allocate them on the (larger) heap instead by using malloc.