C++ program to implement Heap sort Algorithm

Tuesday, February 1st, 2011  »  Posted By  »  Total 10 Comments

#include <iostream.h> const int MAX = 10 ; class array { private : int arr[MAX] ; int count ; public : array( ) ; void add ( int num ) ; void makeheap(int ) ; void heapsort( ) ; void display( ) ; } ; array :: array( ) { count = 0 ; for […]

C++ program to implement Quick sort Algorithm using class

Tuesday, February 1st, 2011  »  Posted By  »  Total 8 Comments

#include <iostream.h> const int MAX = 10 ; class array { private :   int arr[MAX] ; int count ; public :   array( ) ; void add ( int item ) ; int getcount( ) ; static int split ( int *, int, int ) ; void quiksort ( int lower, int upper ) […]

C++ rogram to implement merge sort

Tuesday, February 1st, 2011  »  Posted By  »  Total 2 Comments

#include <iostream.h> const int MAX = 5 ; class array { private : int *a ; int size ; int count ; public : array( ) ; array ( int sz ) ; void add ( int num ) ; void display( ) ; void merge_sort(int low,int high); void merge(int low,int mid,int high); ~array( ) […]

C++ program to implement Insertion sort using class

Tuesday, February 1st, 2011  »  Posted By  »  Total 2 Comments

#include <iostream.h> const int MAX = 10 ; class array { private : int arr[MAX] ; int count ; public : array( ) ; void add ( int item ) ; void sort( ) ; void display( ) ; } ; array :: array( ) { count = 0 ; for ( int i = […]

C++ program to implement Selection sort using class

Tuesday, February 1st, 2011  »  Posted By  »  Total 2 Comments

#include <iostream.h> const int MAX = 10 ; class array { private : int arr[MAX] ; int count ; public : array( ) ; void add ( int item ) ; void sort( ) ; void display( ) ; } ; array :: array( ) { count = 0 ; for ( int i = […]

C++ program using class to generate mark sheet using multiple inheritance

Sunday, April 4th, 2010  »  Posted By  »  Total 20 Comments

Using multiple inheritances, prepare a Student Mark sheet, class marks for every student in three subjects. The inherited class generates mark sheet. #include<iostream.h> #include<stdio.h> #include<dos.h> class student { int roll; char name[25]; char add [25]; char *city; public: student() { cout<<"welcome in the student information system"<<endl; } void getdata() { cout<<"\n enter the student roll […]

C++ program using class to multiply by 10 to every member of a list

Sunday, April 4th, 2010  »  Posted By  »  Total 1 Comment

Write a program using class which reads a list of N number of integer type in an array. It modifies the list by multiplying 10 to every number of the list. The modified list is displayed. #include<iostream.h> #include<conio.h> class array { public: void readarray(); void multiply(); }; void array::readarray() { int a[10]; cout<<"Enter the elements […]

C++ program to illustrate Multilevel Inheritance

Saturday, March 13th, 2010  »  Posted By  »  Total 12 Comments

MULTILEVEL INHERITANCE AIM: A program to illustrate multilevel inheritance. we have three classes, student, test and result. Here class student is the base class. And the class test is derived from the base class student. And the another class result is derived from the class test. ALGORITHM: • Start the process • Invoke the base […]

C++ program to illustrate a Single Inheritance

Saturday, March 13th, 2010  »  Posted By  »  Total 9 Comments

SINGLE INHERITANCE AIM: A program to illustrate a single inheritance. We have a base class B and a derived class D. The class B contains one private data member, one public data member and three public member functions. The class D contains one private data member and two public member functions ALGORITHAM: • Start the […]

Java program using String Tokenizer class

Friday, October 2nd, 2009  »  Posted By  »  Total 2 Comments

Write a Java program that reads a line of integers and displays each integer and sum of all integers using String Tokenizer class

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

Free email signup

Email: