To prevent such behaviour you should use:
1. long long 
2. #include <stdint.h>