C++ program for implementation of class

Friday, March 12th, 2010  »  Posted By  »  Total 0 Comment

AIM: A program to solve a quadratic equation, using OOP techniques. ALGORITHM: 1) Start the process 2) Invoke the classes 3) Get the input for a,b,c; 4) Call the function getinfo() and display() 5) Check if a=0 a) True : compute c/b; i) Print the value of a/c; b) False: compute b*b-4*a*c; i) If ( [...]

C++ program to implement the Queue ADT using a single linked list

Thursday, March 11th, 2010  »  Posted By  »  Total 1 Comment

/* Write C++ programs to implement the Queue ADT using a singly linked list */ #include<iostream> #include<conio.h> #include<stdlib.h> using namespace std; class node { public: class node *next; int data; };   class queue : public node { node *head; int front,rare; public: queue() { front=-1; rare=-1; } void push(int x) { if (rare < [...]

C++ program to perform Insert, Delete, Search an element into a binary search tree

Wednesday, March 10th, 2010  »  Posted By  »  Total 3 Comments

/* Write a C++ program to perform the following operations:
a) Insert an element into a binary search tree.
b) Delete an element from a binary search tree.
c) Search for a key element in a binary search tree. */

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup