//#pragma comment(lib, "ws2_32.lib")
#include <stdio.h>
//#include <WinSock2.h>
#include <arpa/inet.h>
int main()
{
char str1[2] = { 0x00, 0x06 };
char str2[2] = { 0x04, 0xD2 };
int result;
result = ntohs(*(u_short*)str1);
result = ntohs(*(u_short*)str2);
return 0;
}
Ly8jcHJhZ21hIGNvbW1lbnQobGliLCAid3MyXzMyLmxpYiIpCgojaW5jbHVkZSA8c3RkaW8uaD4KLy8jaW5jbHVkZSA8V2luU29jazIuaD4KI2luY2x1ZGUgPGFycGEvaW5ldC5oPgoKaW50IG1haW4oKQp7CgljaGFyIHN0cjFbMl0gPSB7IDB4MDAsIDB4MDYgfTsKCWNoYXIgc3RyMlsyXSA9IHsgMHgwNCwgMHhEMiB9OwoJaW50IHJlc3VsdDsKCglyZXN1bHQgPSBudG9ocygqKHVfc2hvcnQqKXN0cjEpOwoJcHJpbnRmKCIlZFxuIiwgcmVzdWx0KTsKCXJlc3VsdCA9IG50b2hzKCoodV9zaG9ydCopc3RyMik7CglwcmludGYoIiVkXG4iLCByZXN1bHQpOwoJcmV0dXJuIDA7Cn0K