Unique number -1

the Error I am getting is “*** stack smashing detected ***: /testcase6272609/execdir/program terminated”

while the same code works fine in terminal on my pc

what could be the reason for this??

send the link to your code.

due to some reason the coding blocks ide is not showing the shareable link

here’s the google drive link https://drive.google.com/open?id=1z81HD3gFeLYGyCSCESPhVS0q2Iu5yT86

in Unique Number-III also, I used the same code and it gave the same error.so,I removed the function I created for solving the question and copied the function’s code into the main function and it worked. I tried doing the same thing with unique number -I but only one test case passed,for the 2nd test case,it showed runtime error

there is no need for what you did.
just take xor-sum of all the numbers, all the elements which are present twice gets xor sum 0 and only the element which is unique remains.