# C Programming Code Examples

## C > Sorting Searching Code Examples

### C Program to Implement CockTail Sort

Code Prints Fibonacci Series upto n Terms -
C Programming print Fibonacci series up to n terms using loop. Fibonacci series is a series of numbers where the current number is the sum of previous two terms. For Example: 0, 1,

Count total number of notes in an amount -
C program input amount and print minimum number of notes (Rs. 500, 100, 50, 20, 10, 5, 2, 1) required for the amount. There any many optimal algorithms to solve given problem.

C Output of a Program is Input of Another -
Pipe the output of program to the input of another. Duplicate stdin and stdout so we can restore them later. Make the write end of the pipe stdout. Run the program. Its output will

Code Finds the Median of 2 Sorted Arrays -
Algorithm finds the median of 2 sorted arrays using binary search approach. Takes the input of 'n' Data Elements of both the arrays. Using decrease, conquer method find the combined

Performs Left Rotation on a Binary Search -
A tree rotation moves one node up in the tree and one 'node down'. It is used to change the shape of the tree, in particular to decrease its height by moving smaller subtrees down and

C Program code find LCM of two numbers -
C program code input two numbers and find LCM (Lowest Common Multiple) using loop. Input two numbers from user. Store them in some variable say j1 and j2. Find maximum...

Equilateral Triangle Printing In C Program -
C language program code print to Equilateral Triangle. Triangle with all Sides Equal is called Equilateral Triangle. We shall now see how to print stars *, in Equilateral Triangle shape and

Program To Implement Doubly Linked List -
Creating double link list. and Insertion at the beginning. Insertion of element at particular position. "Deletion" of element from the List. 'Display' elements of doubly link list. Reverse