I have a function in C that is supposed to find how many 'X' are in a given char array. I receive the array in the argument, but i do not receive its length
So in C it would be
countX(char ss[]){
int i=0; cont=0;
while(ss[i]!='/0'){
if(ss[i]=='X') cont++;
i++;
}
return cont;
}
}
I have to implement this in asssembly but since i do not have the length of the array, i do not know what value do i need to compare in cmp instruction to reach the end of the char array?