I am using 64 bit operating system ,then also i am not able to print 46th fibonacci number correctly which is less than 4 billion.
#include
#inclu
i am not able to print 46th fibonacci number correctly which is less than 4 billion.
You are most probably going out of range of an integer, which is from -4294967296 to 4294967295.
Change int array[n];
to long long array[n];
Also, the printf's should be changed from %i
to %lli
Edit : On running the numbers, you get expected value of F(48) as 4807526976 which is out of range of an integer.