Thank you for your time!
for value upto 2147483641 code is working fine after that it is returning 0(why).. as per my understanding program should return 0 only