TATA ELXSI Interview Question

Reverse the Integer and year calculation