# Fibonacci Series C Program

## C Program To Print Fibonacci Series

Learn How To Print Fibonacci Series in C Programming Language. It is important that we should know How A For Loop Works before getting further with the C Program Code.

#### What is a Fibonacci Sequence?

A Fibonacci Sequence is a Sequence of Numbers in which the Next Number is found by Adding the Previous Two Consecutive Numbers.

Note: The First Two Digits in a Fibonacci Series is always 0 and 1.

A Fibonacci Series consists of First Digit as 0 and Second Digit as 1. The Next Digit (Third Element) is dependent upon the Two Preceding Elements (Digits). The Third Element so, the Sum of the Previous Two Digits. This addition of previous two digits continues till the Limit.

0 1 1 2 3 5 8

#### Output

There’s a trick with the Fibonacci Sequence. The Consecutive Terms in a Fibonacci Sequence can be made to Convert Miles to Kilometers. This has something to do with the Zeckendorf’s Theorem.

5 and 8 are consecutive terms in a Fibonacci Series.  Also, 5 Miles = 8 Kilometres. Similarly, 8 Miles = 13 Kilometres.

In case you get any compilation errors in the above Code To Print Fibonacci Sequence in C Programming using While Loop and For Loop or if you have any doubts about it, let us know about it in the Comment Section below.

#### Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

### 22 thoughts on “Fibonacci Series C Program”

• October 19, 2015 at 4:15 pm

Excellent! Thanks!

• November 5, 2015 at 8:02 pm

Thanks for multiple methods!

• July 31, 2016 at 7:18 pm

You’re welcome Shanmukha. Our main reason to post multiple methids is to help the students understand the differences between them which will help then to clear basic concepts.

• November 28, 2015 at 8:02 pm

Please provide Codes for Series programs in C.

• June 3, 2016 at 12:15 pm

Sure! You can check for them in the C Programs Menu Header

• July 31, 2016 at 7:16 pm

Its already there on our website. Make a search related to Sum of Series in C our Search bar.

• December 9, 2015 at 10:51 pm

• July 31, 2016 at 7:20 pm

You’re welcome. Find more updated C Programs on codingAlpha.

• August 20, 2016 at 11:37 pm

Can we solve Fibonacci Series C Program using Recursion method?

• August 21, 2016 at 12:11 am

Yes Akshay. Almost all the For Loops, While Loops can be converted into Recursion methods. You just need to understand Recursion properly.

• August 26, 2016 at 7:53 pm

Is this a common interview question? My teachers told that it is frequently asked in interviews.

• September 5, 2016 at 12:16 pm

It depends on the interviewer. But, you should understand the logic of Fibonacci Series. It is not that difficult.

• September 5, 2016 at 12:14 pm

Thanks. You have made this logic for Fibonacci series quite simple to understand.

• September 13, 2016 at 10:26 pm

Perfect code examples for Fibonacci Series in C. Thank you very much.

• September 15, 2016 at 12:17 pm

When we have written this code
first = second;
second = third;
count++;
then why do we need to take the value of first and second as 1 and 0 at initialization in this fibonacci c program?

• October 6, 2016 at 7:16 pm

Thanks for the fibonacci series logic. This is too good program!

• November 5, 2016 at 6:30 pm

Instead of hard coding the first and second values of the fibonacci sequence, why not take the values from the user itself. Just in case he/she wants to begin the fibonacci sequence after a certain number, it would be much easier to code it in C language.

• November 5, 2016 at 6:55 pm

Thanks for this. It is so nice of you to code and publish different methods for every given program. Keep it up.

• November 16, 2016 at 3:32 pm

Nice explanation.