Browsing articles in "C and C++"
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 [...]

Nov
28
2008

C++ Program to implement a doubly linked list.

C++ Program to implement a doubly linked list. /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: C++ Program to implement a doubly linked list. ***************************************************************/ #include<iostream.h> #include<conio.h> #include<process.h> // Creating a NODE Structure struct node { int data; // data struct node *next,*back; // link to next node and previous node }; // Creating a class LIST class list { struct node *root,*end; public: void create(); // to create a list void insert(); // [...]

Mar
28
2008

C++ Program to perform the array operations

C++ Program to perform the following array operations. Insertion Deletion Traversing Merge two arrays /************************************************************** Author: Arun Vishnu M V Web: www.arunmvishnu.com Description: Program to perform the following array operations. a) Insertion b) Deletion c) Traversing d) Merge two arrays ***************************************************************/ #include<iostream.h> #include<conio.h> #include<process.h> void main() { int array1[150],array2[150],array3[300],i,j,n1,n2,position; int element,choice,n3; clrscr(); coutn1; cout

Pages:«123

Archives

Highslide for Wordpress Plugin