If you want to become a professional programmer, then the same.
x = ntohs(*(short*)p);
Which is wrong, and has been wrong since 1980, but they still teach it because college professors don't have enough real world experience to know it's wrong.
The correct way to teach it should be:
x = p[0] * 256 + p[1];