C++ Programming Tutorial

 
 
 

Data File Structure Programs

Array

Insert, edit, delete, append, display, Srch. Insert, delete, merge, delete multiple occurrences Arrays as a Stack in graphics

Stack

Stack operations using array Stack using static memory allocation Stack using dynamic memory allocation Double ended link list as a stack Lnked list as a Stack Infix expr. to Postfix expr. Postfix expr. into an Infix expr. Arrays as a Stack in graphics Stack as an Arithmetic expr. Evaluater Graphical Rep. of Stack Stack to traverse - inodr, postodr, preodr

Queue

Queue using static memory allocation Queue using dynamic memory allocation Circular queue Linked list as a Queue Double Ended linked list as a Queue Graphical Rep. of Queue Arrays as a Linear Queue Array as a Circular Queue Arrays as a Linear Queue ( in graphics ) Arrays as a Circular Queue ( in graphics )

Linked List

Singly link list Circular linked list Doubly link list Linked list as a Queue Linked list as a Stack Double Ended linked list as a Queue Double Ended linked list as a Stack Infix to Postfix - Linked List as Stack Circular doubly link list Single Ended Linked List - Sorting in both odr Hashing - double ended Linked List Sort of link list

Tree

Linked List as a Binary Srch. Tree Set Class using Binary Srch. Tree Maximum depth of Binary Srch. Tree Minimum Spaning Tree Prims algo - minimum spanning tree Traverse binary tree - inodr, preodr, post Find number in binary Srch. tree display levell

Sorting

Bubble Sort Selection Sort Insertion Sort Radix Sort Merge Sort Quick Sort Heap Sort Linear Sort Shell Sort Topological Sort

Searching

Linear Srch. or Sequential Srch. Binary Search Breadth First Search Traversal Depth First Search Traversal Shortest Path-Given Source-Destination-Dijkstras

Hashing

Simple implementation of Hashing Hashing using double-ended Linked List Hashing using Mid-Square Method Example of Hashing n term of the fibonacci series using recursion

Recursion

Factorial of the given number using recursion Mystery of Towers of Hanoi using recursion
 
 

Image

 #include<iostream.h>
 #include<conio.h>

 long fibonacci(int);

 main()
    {
       clrscr();

       int number;
       long result;

       cout<<\"\\n Enter the number = \";
       cin>>number;

       cout<<\"\\n The fibonacci series upto the \"<<number<<\"_th term is : \"
                                     <<endl;

       for(int count=0;count<=number;count++)
      {
         result=fibonacci(count);
         cout<<\" \"<<result;
      }

       cout<<\"\\n\\n The \"<<number<<\"_th term of fibonacci series = \"<<result
                                <<endl;

       getch();
       return 0;
    }


 //---------------------------  fibonacci(int)  --------------------------//


 long fibonacci(int n)
    {
       if(n==0 || n==1)
      return n;

       else
      return fibonacci(n-1)+fibonacci(n-2);
    }

    Related Post:
  1. Program to construct and display the Divided Difference Table from the given distinct data points.

  2. Program that maintains telephone directory

  3. Program to read a Non-Linear equation in one variable, then evaluate it using Newton-Raphson Method and display its kD accurate root

  4. Program to print, read and calculate sum, smallest, largest element an array using pointers

  5. Prims algorithm for minimum spanning tree

  6. Program to rotate the word Computer by 1 results in rCompute

  7. Program to display string triangle

  8. Program to illustrate the use of friend classes

  9. Program to estimate the value of First Derivative of the function at the given points from the given data using Central Difference Formula of order 4

  10. Program to show the implementation of Binary Search Tree as Sets

  11. Program to construct Lagrangess Interpolation Formula from the given distinct data points.

  12. Program to show an example of Hashing using Mid-Square Method.

  13. Program to fill a Polygon using Scan Line Polygon Fill Algorithm

  14. Program of simple example of class and object

  15. Program to show the implementation of Window-to-Viewport Transformaton

  16. Program to show the implementation of Point Clipping Algorithm

  17. Program to perform merge sort

  18. Program that takes input of 2 matrix rows and columns data and displays addition of it using + operator overloading

  19. Program to draw a 3D Piece-Wise Bezier Curve of nth degree with Zeroth Order Continuity

  20. Program to show the implementation of Sutherland-Hodgeman Polygon Clipping Algorithm