Home » C Programs » Fibonacci Series Program in C Using Array

# Fibonacci Series Program in C Using Array

In this program, we can execute and find the fibonacci series program using an array for beginners to understand the implementation of the fibonacci series in an array.

## Fibonacci Series in C

The Fibonacci sequence is a collection of numbers that starts with one or zero and ends with one, with each number (called a Fibonacci number) equal to the sum of the two numbers before it. The golden ratio is roughly 1.618, which is represented by the Greek letter phi. The golden ratio is best approximated by the renowned “Fibonacci numbers.” Fibonacci numbers are an infinite series that starts with 0 and 1 and continues by adding the two numbers before it.

## Array Definition in C

An array is a collection of data elements of the same type stored in contiguous memory regions. Arrays are a derived data type in the c programming language that may hold primitive data types like int, char, double, float, and so on. An array is a collection of elements of the same kind that are stored in contiguous memory locations and may be accessed separately using a unique identifier’s index.

## Fibonacci Series Program in C Using Array

``````//Fibonacci Series Program in C Using Array
#include<stdio.h>
int main()
{
int fib[24];
int i;
fib[0] = 0;
fib[1] = 1;
for(i = 2; i <24; i++)
fib[i] = fib[i-1] + fib[i-2];
for (i = 0; i < 24; i++)
printf(" %6d\n",fib[i]);
}``````

Output: