Please be specific and include actual errors messages.
The code you posted won't run because it does not compile. Part of programming is understanding compiler error messages and fixing the problem.
Lines 5-7: You function prototypes do not match your function definitions.
Line 50: No type for n.
Line 55: Where is array defined? Do you mean test?
Line 56: This line does nothing.
Line 64: test is not declared correctly. No type specified for n.