I am using the iterative fib algorithm that I have copied below. I have found this algorithm on Rosetta code and it gives me the correct answer up until fib(46). After that
Make your variables long long instead of int. 'int' depending on the machine could be 64, 32, 16 or 8-bits.
If you want to specify the size of the integer yourself and make a portable code then make use of uint8_t, uint16_t, etc or int8_t, int16_t, etc. The 'u' stands for unsigned. This is a part of the stdint.h library!