I'd probably keep a pointer to the end of the string and use sprintf. ... i++) { /* "sprintf" converts each byte in the "buf" array into a 2 hex string ... ... <看更多>
Don't mix signed and unsigned. GCC warns about 192329.c:8:79: warning: conversion to 'long unsigned int' from 'int' may change the sign of ... ... <看更多>