注意字符串的strlen与sizeof的差别 unsigned char AT_RESET[]="r "; printf("strlen=%d sizeof=%d ",strlen(AT_RESET),sizeof(AT_RESET)); 结果:strlen=3 sizeof=4