C++ Programming Tutorial


Data File Structure Programs


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


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 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


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


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


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


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


Factorial of the given number using recursion Mystery of Towers of Hanoi using recursion
struct btree
    struct btree *left;
    struct btree *right;
    int no;
void postorder(struct btree *trav);
void inorder(struct btree *trav);
void preorder(struct btree *trav);
struct btree * create(struct btree *trav);
    struct btree *root=NULL;
    char c;
        cout<<\"Do you want to continue : \";
        if(c==\'n\' ||c==\'N\')
    cout<<endl<<\"Inoder is    : \";inorder(root);
    cout<<endl<<\"Preorder is  : \";preorder(root);
    cout<<endl<<\"Postorder is : \";postorder(root);
struct btree * create(struct btree *trav)
        trav=new btree;
        cout<<\"Enter the no : \";
    char choice;
    cout<<\"Enter the left or right child : \";
    if(choice == \'r\' || choice == \'R\')
    if(choice==\'l\' || choice==\'L\')
void inorder(struct btree *trav)
        return ;
    cout<<\" \"<<trav->no;
void preorder(struct btree *trav)
    cout<<\" \"<<trav->no;
void postorder(struct btree *trav)
    cout<<\" \"<<trav->no;

    Related Post:
  1. Program that computes the n_th term of the fibonacci series and also print the series upto the n_th term using recursion

  2. Program to illustrate the difference b/w passing the whole array and the single array element as a parameter to a function

  3. Program to get possible prime numbers like number 6158 contains the substrings 6, 1, 5, 8, 61, 15, 58, 615, 158, and 6158.Find the largest substring..

  4. Program to implement the Prims Algorithm to solve Minimum Spanning Tree Problem (MST) using Graphics

  5. Program to draw an ellipse using MidPoint Ellipse Algorithm

  6. Program that prints odd numbers form 0 to 50 (Using for Loop)

  7. Program of virtual inheritance that takes input of staff members and performs an operation on it

  8. Program that provides an example of return by reference from functions

  9. Program to illustrate the implementation of Scaling Transformation

  10. Program to draw a 3D Bezier Surface for MxN control points

  11. Program to illustrate strings as member of classes

  12. Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student

  13. Program to illusrate comparision operator overloading

  14. Program to draw a line using Cartesian Slope-Intercept Equation [ Simple Implementation ]

  15. Program to illustrate an example of structures

  16. Program that maintains library shop stock using link list

  17. Program of KSCANNER

  18. Program to show the use of Bitwise operator OR ( | )

  19. Program that implements overloaded - minus unary operator.

  20. Program to generate a pattern

Didn't find what you were looking for? Find more on Program of traversing a binary tree in inorder, preorder and postorder fashion