暴力定长数组

#include<stdio.h>
#include <string.h>
typedef unsigned char  uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int   uint32_t;


int main()
{
    uint8_t locationarr[5]={0};
    sprintf((char *)locationarr , "%.02s" , (char *)"50012000020003010101" ) ;
    printf("%s\n", locationarr);
}

//暴力控制过来到数组是2个 50

猜你喜欢

转载自blog.csdn.net/weixin_42381351/article/details/85246317