Question: (b) (4 marks) Given an array of bytes, write a C code that counts how manv bvtes in the array satisfy the following two conditions:
(b) (4 marks) Given an array of bytes, write a C code that counts how manv bvtes in the array satisfy the following two conditions: (1) number of 1 's in the byte is 3,12 Input: list: array of bytes (uint8), length: size of the array (int16). Output: the counter (uint16) Example: length 4 , list (0]=0b10011000, list [1]=0b10000011, list [2]=010000000 The returned value after calling the function count (list,3) is 1 . Only Ilst [0] satisfles the condition
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
