printf输出16进制数
// 把网卡MAC地址格式化成常用的16进制形式,如0010-A4E4-5802
printf( "The Ethernet Number[%d] is: %02X%02X-%02X%02X-%02X%02X"n",
lana_num,
Adapter.adapt.adapter_address[0],
Adapter.adapt.adapter_address[1],
Adapter.adapt.adapter_address[2],
Adapter.adapt.adapter_address[3],
Adapter.adapt.adapter_address[4],
Adapter.adapt.adapter_address[5]);
printf( "The Ethernet Number[%d] is: %02X%02X-%02X%02X-%02X%02X"n",
lana_num,
Adapter.adapt.adapter_address[0],
Adapter.adapt.adapter_address[1],
Adapter.adapt.adapter_address[2],
Adapter.adapt.adapter_address[3],
Adapter.adapt.adapter_address[4],
Adapter.adapt.adapter_address[5]);