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


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

 void bubble_sort(long [],int);

 main( )
       clrscr( );

       const int array_size=10;

       long array[array_size]={0};

       cout<<\"\\n ******************************************************************************\"<<endl;
       cout<<\" ********************************  Bubble Sort  *******************************\"<<endl;
       cout<<\" ******************************************************************************\"<<endl;

       cout<<\"\\n * Array size = 10\"<<endl;
       cout<<\" * Data Type = long\"<<endl;

       cout<<\" ******************************************************************************\";
       cout<<\" ******************************************************************************\";

       cout<<\" Enter the array : \"<<endl<<endl;

       for(int count_1=0;count_1<array_size;count_1++)
         cout<<\"\\t Element[\"<<count_1<<\"] = \";


       cout<<\" Sorted Array : \";

       for(int count_2=0;count_2<array_size;count_2++)
         cout<<\"Element[\"<<count_2<<\"] = \"<<array[count_2]<<endl;

       getch( );
       return 0;

 //-----------------------  bubble_sort(long[],int)  ---------------------//

 void bubble_sort(long array[],int array_size)
       for(int count_1=0;count_1<array_size;count_1++)
         for(int count_2=0;count_2<array_size-1;count_2++)
             long temp=array[count_2];

    Related Post:
  1. Program to show the projection of 3D objects using Standard Perspective Projection

  2. C++ Hotel Management Project

  3. Program to illustrate the 2D array of char (string) using pointers

  4. Program of address calculation sort

  5. Program to show the projection of 3D objects using Cabinet Oblique Parallel Projection onto xy-plane (i.e. angle=30 deg)

  6. Program to illustrate the implementation of arrays as a Linear Queue

  7. Program of doubly link list

  8. Program that performs addition of 2 matrix using friend function

  9. Program to show the implementation of Hashing with Insert, Delete and search functionality using double-ended Linked List

  10. Program to illustrate the binary operator(+) overloading by creating a new object

  11. Program to calculate distance summation, subtraction, multiplication and comparison using overloading operators also make it friend functions

  12. Program that takes short date from a user and displays medium date

  13. Double Linked List-C++

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

  15. Program to show the implementation of Cohen-Sutherland Line Clipping Algorithm

  16. Program of Line clipping by Cohen Sutherland

  17. Program that takes input of counter and displays output of incremented counter using overloading operator++

  18. To parse a string using First and Follow algorithm and LL-1 parser

  19. Program to illustrate pointers and an array of structure

  20. Program of class and objects using private and public data members

Didn't find what you were looking for? Find more on Program to illustrate the Bubble Sort