再请教两个485填表的小问题# EB23 - 劳工卡
c*2
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
(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