I have a byte array of strings. How can I check if a byte in that array contains 0? For example:
byte array
strings
char byte_arr[5] = "abc00";
The last two bytes of the above array contains 0. How can I detect that in c?
c
Simple algorithm to follow
count_zero = 0 for each element a, in byte_array check if a is '0' count_zero++
2.1m questions
2.1m answers
60 comments
57.0k users