How do I test for an empty spot in my arrays | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I test for an empty spot in my arrays

I have an array of 100 and I need any easy way to find the 1st open spot and add something to it but I can't quite seem to figure it out

24th Feb 2022, 12:15 AM
Billy Stanley
Billy Stanley - avatar
2 Answers
+ 2
while (arr[i]!='\0') {i++;} your code goes here
24th Feb 2022, 1:58 AM
HungryTradie
HungryTradie - avatar
+ 1
Thanks
24th Feb 2022, 2:37 AM
Billy Stanley
Billy Stanley - avatar