runtime error sigsegv using gets or fgets

do codechef judge doesnot passes gets or fgets.when i used this function to input an array it gave runtime error sigsegv.pls help :);

//