I have to get the number of elements in an array using a function. This is what I have, and I have tried many variations and changing things around but I cannot get it to return the correct number. Point me in the right direction please?
I only attached the parts that are relevant to my question.
NEW QUESTION: How can I get it to loop through an array until it reaches the value of -1? Can I do while(i!=-1)? I think a for statement afterwards but what do I put in the middle? for(j=0,?,j++)?
I only attached the parts that are relevant to my question.
NEW QUESTION: How can I get it to loop through an array until it reaches the value of -1? Can I do while(i!=-1)? I think a for statement afterwards but what do I put in the middle? for(j=0,?,j++)?
