(1)sprintf 格式化字符串 + strcat(x) #include <stdio.h> #include <string.h> #include <arpa/inet.h> #include <netinet/in.h> typedef uint32_t u32; typedef uint8_t u8; void U32ToU8Array(u8 *buf, u32 u32Value) { buf[0] = ((u32Value >> 24) & 0xFF