From your second while loop...
Note that you are declaring idNum but never intializing it to a value.
If you wanted to use the one declared at the top of main (which would make sense) you should not redeclare it here.Code:while (e==1) { int scoreCheck,idNum; id[ctr]=idNum; scoreCheck=searchInt(id,ctr,idnbr);