Then you are not fully prepared to write this program. I don't care what a person's IQ is or how much schooling with a comp-sci major they have, I don't even care if they came up through the school...
Type: Posts; User: CommonTater
Then you are not fully prepared to write this program. I don't care what a person's IQ is or how much schooling with a comp-sci major they have, I don't even care if they came up through the school...
From your second while loop...
Note that you are declaring idNum but never intializing it to a value.
while (e==1)
{
int scoreCheck,idNum;
id[ctr]=idNum;
...
Uh-huh... I suppose I can can let you off the hook this time ... LOL.
Both his and my function would return 0 in that case.
:D You aren't by any chance having a medication-free day again, are you?
It returns... K if idnm is matched or -1 if it's not matched after the loop completes.
I don't see the problem...
Try your search function like this....
int searchInt(int a[],int ctr,int idnm)
{
int k;
for (k = 0; k < ctr; k++)
if (a[k] == idnm)
return k;
return -1;