c***2 发帖数: 838 | 1 #1: In C, please write code to determine the longest consecutive bit string
(1 or 0) in an array of bytes.
For example,
char string[] = { 0xff, 0xa0, 0x00, 0x01, 0xff, 0xff, 0xaa };
(longest 1's)=18 (longest 0's)=20
So longest consecutive bit string=20 |
|