Shri Govindram Seksaria Institute of Technology and Science: Hospital Management of Information Systems Lab File
Shri Govindram Seksaria Institute of Technology and Science: Hospital Management of Information Systems Lab File
This is to certify that Palash Jha (0801BM101040) student of Final Year Biomedical
Engineering, have successfully presented a Lab file for the subject “Hospital Management
Information Systems”.
He has presented a satisfactory file.
(Signature) (Signature)
We take immense pleasure in thanking Dr. S.S. Bhadouria, Director SGSITS, Dr. P. P.
Bansod, Professor and HOD of Biomedical Engineering Department for permitting us to
carry out this lab work.
We also wish to express our deep sense of gratitude to our internal mentor Mr. Vinay
Manurkar for his able guidance and useful suggestions which helped us in completing the
practical work in time.
We would also like to thank the staff of Biomedical Engineering Department for their
valuable assistance in the lab.
Words are inadequate in expressing our gratitude to our teachers and our parents for their
blessings and inspiration.
Lastly we would like to acknowledge our friends and others who spared their precious time
to provide us with extremely valuable information which helped us to complete our practicals
successfully.
Q. INSERT AND DELETE a node at the beginning of a Linear linked list.
#include <stdio.h>
#include <conio.h>
OUTPUT:
Given linked list: 5 6 2 3
Deleting First node
Modified Linked List: 6 2 3
Q. Write a program to perform PUSH and POP operations on stack using array or
Linked List.
#include <stdio.h>
#include <conio.h>
#define MAX 5
int top;
/* PUSH FUNCTION */
void push (int stack[], int item)
{
if (top== (MAX-1))
printf(" The stack is full");
else
{
printf(" Enter the element to be inserted");
scanf("%d", &item);
top= top+1;
stack[top] = item;
}
}
/* POP FUNCTION */
void pop (int stack[])
{
int item;
if (top==-1)
printf(" The stack is Empty");
else
{
item= stack[Top];
top=top-1;
}
return(item);
}
/* Display Stack elements */
void show()
{
int i;
printf(" The stack elements are:");
for(i=0; i<=top;i++)
{
printf("%d", stack[i]);
}
}
int main()
{
char ch;
int choice
printf("1. PUSH");
printf("2. POP");
printf("3. Display");
do
{
printf(" Enter your choice");
scanf("%d", &choice);
switch(choice)
{
case1:
push(stack, item);
show();
break;
case2:
pop(stack);
show();
break;
case3:
show();
break;
}
printf("Do you wish to continue(Y/N)");
ch= getch();
}
while (ch=='y' || ch=='Y');
getch();
}
OUTPUT:
1. PUSH
2. POP
3. Display
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
void insertion()
{
if(rear==n)
{
printf(“\nQueue Overflow\n”);
}
else if (rear==0)
front = rear = 1;
else if(rear==n)
rear=1;
else
rear=rear+1;
void deletion()
{
if(front==0)
{
printf(“\nQueue Underflow\n\n”);
item=q[front];
if(front==rear)
{
front=0;
rear=0;
}
else if (front=n)
front=1;
else
front=front+1;
printf(“\n%d is deleted\n\n”,item);
void show()
{
for(int i=0;i<=rear;i++)
printf(“%d\t”,q[i]);
int main()
{
int op;
do
{
printf(“\n1 : Insert”);
printf(“\n2 : Delete”);
printf(“\n3 : Print”);
printf(“\nEnter your choice : “);
scanf(“%d”,&op);
switch(op)
{
case 1:
insertion();
break;
case 2:
deletion();
break;
case 3:
show();
break;
}
}while(op!=4);
}
OUTPUT:
1 : Insert
2 : Delete
3 : Print
Enter your choice : 1
Enter the item : 80
80 is inserted
1 : Insert
2 : Delete
3 : Print
Enter your choice : 2
80 is deleted
1 : Insert
2 : Delete
3 : Print
Enter your choice : 2
Queue underflow
5 is deleted