Posts

Showing posts from December, 2025

oops

 EXPT. NO. 1 WRITE A PROGRAM TO DISPLAY INFORMATION OF STUDENT OBJECTS Objects are the basic run-time entities in an object-oriented system. They may represent a person, a place, a bank account, a table of data or any item that the program must handle. The fundamental idea behind object oriented approach is to combine both data and function into a single unit and these units are called objects. The term objects means a combination of data and program that represent some real word entity. For example: consider an example named Amit; Amit is 25 years old and his salary is 2500. The Amit may be represented in a computer program as an object. The data part of the object would be (name: Amit, age: 25, salary: 2500). Class : Class is a group of objects that share common properties and relationships .In C++,data type that contains member variables and member functions that operates on the variables. 2 A class is defined with the keyword class. It allows the data to be hidden, if necessary...

DAA

  Experiment No.1 Heap sort Aim:- Program to implement Heap sort Objective: To write a C program to perform Heap sort using the divide and conquer technique Theory: A max (min) heap is complete binary tree with the property that the value at each node is at least as large as (as small as) the values at its children (if they exist) Call this property the heap property. Algorithm: Step 1: Start the process. Step 2: Declare the variables. Step 3: Enter the list of elements to be sorted using the get function. Step 4: Divide the array list into two halves the lower array list and upper array list using the merge sort function. Step 5: Sort the two array list. Step 6: Combine the two sorted arrays. Step 7: Display the sorted elements using the get() function. Step 8: Stop the process /* Program for Heapsort*/ #include<stdio.h> void heapsort(int[],int); void heapify(int[],int); void adjust(int[],int); void main() { int n,i,a[50]; clrscr(); printf("\nEnter the limit:"); scanf(...