Detecting Big-endian hardware

Question | Apr 23, 2016 | hkumar 

What will be the output of below C++ code on a Big-endian hardware?

int i = 0x00010101;
char* p = (char*)&i;

printf("0x%02X%02X%02X%02X", p[3], p[2], p[1], p[0]);