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>
#define MAX 10
#define MIN 0
#include \"stack.cpp\"


void main(){
   int choice;
   stack obj;
   while(1){
   clrscr();
   cout<<\"\\n\\t\\tÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\\n\";
   cout<<\"\\t\\t³  STACK OPERATIONS USING ARRAY   ³\\n\";
   cout<<\"\\t\\tÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\\n\";
   cout<<\"\\t\\t³  1) PUSH                        ³\\n\";
   cout<<\"\\t\\t³  2) POP                         ³\\n\";
   cout<<\"\\t\\t³  3) PEEP                        ³\\n\";
   cout<<\"\\t\\t³  4) CHANGE                      ³\\n\";
   cout<<\"\\t\\t³  5) STATUS                      ³\\n\";
   cout<<\"\\t\\t³  6) DISPLAY                     ³\\n\";
   cout<<\"\\t\\t³  7) EXIT                        ³\\n\";
   cout<<\"\\t\\tÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\\n\";
   cout<<\"\\t\\tEnter your Choice :  \";
   cin>>choice;
   int item,index;
   switch(choice){
     case 1 :  cout<<\"\\n\\n\\t\\t*****PUSH*****\\n\";
           cout<<\"\\t\\tEnter item to be pushed : \";
           cin>>item;
           obj.push(item);
           break;
     case 2 :  cout<<\"\\n\\n\\t\\t*****POP*****\\n\";
           item=obj.pop();
           if(item!=-111){
              cout<<\"\\n\\t\\tItem being poped out is : \"<<item;
              getch();
           }
           break;
     case 3 :  cout<<\"\\n\\n\\t\\t*****PEEP*****\\n\";
           cout<<\"\\t\\tEnter index for item to be peeped : \";
           cin>>index;
           item=obj.peep(index);
           if(item!=-111){
              cout<<\"\\n\\t\\tItem to be peeped is : \"<<item;
              getch();
           }
           break;
     case 4 :  cout<<\"\\n\\n\\t\\t*****CHANGE*****\\n\";
           cout<<\"\\t\\tEnter index for item to be changed : \";
           cin>>index;
           cout<<\"\\t\\tEnter item value for it : \";
           cin>>item;
           obj.change(index,item);
           break;
     case 5 :  cout<<\"\\n\\n\\t\\t*****STATUS*****\\n\";
           cout<<\"\\n\\t\\tTotal Elements are : \"<<obj.status();
           getch();
           break;
     case 6 :  cout<<\"\\n\\n\\t\\t*****DISPLAY*****\\n\";
           obj.display();
           break;
     case 7 :  goto out;
     default:  cout<<\"\\n\\n\\t\\tInvalid Choice\\n\\n\";
           getch();
           break;
   }
 }
 out:
}

    Related Post:
  1. Problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs

  2. Program to perform insertion sort

  3. Program of singly link list with different functionalities

  4. Program to print a histogram

  5. Program that reads an expression consisting of two non-negative integer and an operator. Determine if either integer or the result of the expres......

  6. Weather Temperature Recording Project

  7. Program to draw a Cubic Bezier Curve

  8. Code for finding a no in a binary search tree and displaying its level where it is found (root is at zero level)

  9. Program to show the Simple implementation of Hashing

  10. Program to show the Urdu Alphabets using Matrix Method

  11. Program to addition of two polynomial

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

  13. Program to convert an Infix Expression into a Postfix Expression using Linked List as a Stack

  14. Program to show the 3D Shearing Transformation along x-axis

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

  16. Program to maintain employee information also illustrate virtual class and inheritance

  17. Program to estimate the Differential value of a given function using Runge-Kutta Methods

  18. Program to illusrate the use of friend functions

  19. Represent a polynomial in terms of a singly linked list and then add two three variables polynomials

  20. Program to estimate the Integral value of the function at the given points from the given data using Trapezoidal Rule

 
 
Didn't find what you were looking for? Find more on Program to perform stack operations using array