Browsing articles tagged with " source code"
Nov
28
2008

C++ Program to implement a Queue using array

C++ Program to implement a Queue using array. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to implement a Queue using array. ***************************************************************/ #include<conio.h> #include<iostream.h> #include<process.h>   # define MAX_SIZE 150   class queues { int front,rear; int queue[MAX_SIZE]; public: queues() // Constructor { front=(-1); rear=(-1); } void insert_rear(int); void delete_front(); void display(); };   void queues::insert_rear(int item) { if((front==0 && rear==MAX_SIZE) || (front==(rear+1))) { cout<<"Queue is full!\nOverflow"; getch(); exit(0); } else [...]

Nov
28
2008

C++ Program to Add and subtract two polynomials

C++ Program to Add and subtract two polynomials. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to Add and subtract two polynomials. ***************************************************************/ #include<conio.h> #include<ostream.h> #include<process.h> // Creating a NODE Structure struct node { int coe,exp; // data struct node *next; // link to next node and previous node };   // Creating a class Polynomial class polynomial { struct node *start,*ptrn,*ptrp; public: void get_poly(); // to get a polynomial void show(); [...]

Nov
28
2008

C++ Program to Multiply two polynomials using linked list

C++ Program to Multiply two polynomials using linked list. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to Multiply two polynomials using linked list. ***************************************************************/ #include<conio.h> #include<iostream.h> #include<process.h> // Creating a NODE Structure struct node { int coe,exp; // data struct node *next; // link to next node and previous node }; // Creating a class Polynomial class polynomial { struct node *start,*ptrn,*ptrp; public: void get_poly(); // to get a polynomial void [...]

Nov
28
2008

Students list and sort them in C++

C++ Program to make a students list and sort them according to there names, Sort using Merge Sort. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to make a students list and sort them according to there names, Sort using Merge Sort.. ***************************************************************/ #include<conio.h> #include<iostream.h> #include<string.h> struct student { char name[20]; int sem; int regno; float mark; }; struct student students[75]; void msort(int low,int high) // Recursive unction megrge sort { int [...]

Nov
28
2008

Merge two ordered linked list

Merge two ordered linked list to form a 3rd sorted list using C++ /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: Merge two oredered linked list to form a 3rd sorted list using C++. ***************************************************************/ #include<conio.h> #include<iostream.h> #include<process.h> // Creating a NODE Structure struct node { int data; // data struct node *next; // link to next node and previous node }; // Creating a class LIST class list { struct node *start; public: [...]

Nov
28
2008

C++ Program for MERGE SORT

C++ Program for MERGE SORT /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program for MERGE SORT . ***************************************************************/ #include<conio.h> #include<iostream.h> void m_sort(int numbers[], int temp[], int left, int right); void merge(int numbers[], int temp[], int left, int mid, int right); int numbers[150]; int temp[150]; int main() { clrscr(); int i,n; coutn; cout

Nov
28
2008

C++ Program for Linear search

C++ Program for Linear search /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program for Linear search. ***************************************************************/ #include; #include; void main() { int array[100],n,found=0,i,find; clrscr(); cout>n; cout

Nov
28
2008

C++ Program for Insertion sort

C++ Program for Insertion sort /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program for Insertion sort. ***************************************************************/ #include<conio.h> #include<iostream.h> int main() { int array[100],n,i,j,key; clrscr(); cout>n; cout

Nov
28
2008

C++ Program to create a graph and use Depth First Search(DFS)

C++ Program to create a graph and use Depth First Search(DFS). /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to create a graph and use Deapth First Search(DFS) and Breadth First Search(BFS) Traversal. ***************************************************************/ #include #include #include void create(); // For creating a graph void dfs(); // For Deapth First Search(DFS) Traversal. void bfs(); // For Breadth First Search(BFS) Traversal. struct node // Structure for elements in the graph { int data,status; [...]

Nov
28
2008

C++ Program to evaluate a postfix expression

C++ Program to evaluate a postfix expression. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to evaluate a postfix expression. ***************************************************************/ #include; // For isdigit() #include; // For clrscr() #include; // For exit() #include; // For gets() #include; // To find the power # define MAX_STACK 150 class stacks { int value,item,top; int stack[MAX_STACK]; public: stacks()// Constructor { top=(-1); } void push(float); float pop(); }; // Function to PUSH the vale to [...]

Pages:«123»

Archives

Highslide for Wordpress Plugin