Browsing articles from "November, 2008"
Nov
29
2008

i wish i could go back

Now I am in my home… sitting alone in my room.. bit bored.. reading news, blogs , office mails etc. Looking outside.. itz raining.. flashing good old memories.. 1 year before.. 6: endu chyea.. onnu vegam type cheyunundoo… AM: da kanna u der? Sr: hello dear.. K: hii Aha Ellarum ethiyallo…den invi 2 join in yahoo conf:. Yes…im chating with my friends.. All night i used to chat with my close friends.. all laughing..screaming.. small [...]

Nov
28
2008

C++ Program to implement a stack using linked list

C++ Program to implement a stack using linked list. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to implement a stack using linked list. ***************************************************************/ #include<conio.h> #include<iostream.h> #include<process.h> #include<malloc.h>     // Creating a NODE Structure struct node { int data; struct node *next; };   // Creating a class STACK class stack { struct node *top; public: stack() // constructure { top=NULL; } void push(); // to insert an element void [...]

Nov
28
2008

C++ Program implement a stack using an array

C++ Program implement a stack using an array. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program implement a stack using an array ***************************************************************/ #include<conio.h> #include<iostream.h> #include<process.h> void main() { int stack[150],top,n,i,max_stack,choice,element,n_pop; max_stack=150; coutn; cout

Nov
28
2008

C++ Program to add and subtract 2 sparse matrices

C++ Program to add and subtract 2 sparse matrices. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to add and subtract 2 sparse matrices ***************************************************************/ #include&lt;conio.h&gt; #include&lt;iostream.h&gt; #include&lt;process.h&gt;   int main() { clrscr(); int sparse1[10][3],sparse2[10][3],sum[10][3],diff[10][3]; int m,n,p,q,t1,t2,s,d,element; int i,j; cout<<"Enter the number of rows and columns : "; cin>>m>>n; t1=t2=0;   cout<<"\nEnter the first matrix("<<m<<"*"<<n<<"):\n"; for(i=1;i<=m;i++) { for(j=1;j<=n;j++) { cin>>element; if(element!=0) { t1=t1+1; sparse1[t1][1]=i; sparse1[t1][2]=j; sparse1[t1][3]=element; } } } sparse1[0][1]=m; sparse1[0][2]=n; sparse1[0][3]=t1; [...]

Nov
28
2008

C++ Program to find the transpose of a Sparse matrix

C++ Program to find the transpose of a Sparse matrix. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to find the transpose of a Sparse matrix ***************************************************************/ #include<conio.h? #include<iostream.h? #include<process.h?   void main() { clrscr(); int sparse[10][10],transpose[10][10]; int m,n,p,q,t,col,element; int i,j; cout<<"Enter the number of rows and columns : "; cin>>m>>n; t=0; // assigning the value of matrix   cout<<"\nEnter the matrix:\n"; for(i=1;i<=m;i++) { for(j=1;j<=n;j++) { cin>>element; if(element!=0) { t=t+1; sparse[t][1]=i; sparse[t][2]=j; [...]

Nov
28
2008

C++ Program to implement a single linked list

C++ Program to implement a single linked list and Perform the following operations. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to implement a single linked list and Perform the following operations 1: Insertioin 2: Deletion 3: Display ***************************************************************/ #include<conio.h> #include<iostream.h> #include<process.h>   // Creating a NODE Structure struct node { int data; // data struct node *next,*start; // link to next node and previous node };   // Creating a class [...]

Nov
28
2008

C++ Program for Selection sort

C++ Program for Selection sort . /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program for Selection sort . ***************************************************************/ #include<conio.h> #include<iostream.h> #include<process.h>   void main() { int array[100],n,i,j,temp; clrscr(); cout<<"How many numbers–> "; cin>>n; cout<<"Enter "<<n<<" numbers\n"; for(i=0;i<n;i++) cin>>array[i]; for(i=0;i<n;i++) { for(j=i+1;j<n;j++) if(array[i]>array[j]) { temp=array[i]; array[i]=array[j]; array[j]=temp; } } cout<<"\nArray is sorted in ascending order.\n"; for(i=0;i<n;i++) cout<<array[i]<<" "; getch(); } //———————- END——————–

Nov
28
2008

C++ Program for QUICK SORT

C++ Program for QUICK SORT. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program for QUICK SORT. ***************************************************************/ #include<conio.h> #include<iostream.h> #include<process.h>   void quickSort(int numbers[], int array_size); void q_sort(int numbers[], int left, int right);   int numbers[150];   int main() { clrscr(); int i,n; cout<<"How many numbers you want to sort: "; cin>>n; cout<<"Enter "<<n<<" numbers.\n"; for (i = 0; i<n; i++) cin>>numbers[i]; //perform quick sort on array q_sort(numbers,0,n-1);   cout<<"Numbers are sorted\n"; [...]

Nov
28
2008

C++ Program to implement a QUEUE using linked list

C++ Program to implement a QUEUE using linked list. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to implement a QUEUE using linked list. ***************************************************************/ #include<conio.h> #include<iostream.h> #include<process.h> #include<malloc.h>   // Creating a NODE Structure struct node { int data; struct node *next; };   // Creating a class QUEUE class queue { struct node *frnt,*rear; public: queue() // constructure { frnt=rear=NULL; } void insert(); // to insert an element void del(); [...]

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 [...]

Pages:123»

Archives

Highslide for Wordpress Plugin