0% found this document useful (0 votes)
58 views11 pages

Shri Govindram Seksaria Institute of Technology and Science: Hospital Management of Information Systems Lab File

The document is a lab file submitted by Palash Jha, a student of biomedical engineering, for the subject "Hospital Management Information Systems". It contains a certificate signed by internal and external examiners certifying that Palash has successfully completed the lab work. It also includes an acknowledgement thanking various people who helped and supported Palash in completing the practical work.

Uploaded by

Vishal Bharani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views11 pages

Shri Govindram Seksaria Institute of Technology and Science: Hospital Management of Information Systems Lab File

The document is a lab file submitted by Palash Jha, a student of biomedical engineering, for the subject "Hospital Management Information Systems". It contains a certificate signed by internal and external examiners certifying that Palash has successfully completed the lab work. It also includes an acknowledgement thanking various people who helped and supported Palash in completing the practical work.

Uploaded by

Vishal Bharani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Shri Govindram Seksaria Institute of

Technology and Science

Hospital Management of Information Systems


Lab File

Submitted to: Submitted by:


Mr. Vinay Manurkar Palash Jha
(0801BM101040)
CERTIFICATE

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)

INTERNAL EXAMINER EXTERNAL EXAMINER


ACKNOWLEDGEMENT

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>

/* structure of a linked list node */


struct node
{
int data;
struct node *next;
};

/* Function for inserting a node at the beginning */


void insert_at_begin (struct node *head_ref, int new_data)
{
struct node *new_node= (struct node *) malloc(sizeof(struct node));
new_node->data= new_data;
new_node->next= *head_ref;
*head_ref= new_node;
}

/* function for deleting the first node */


void del_beg( struct node *head)
{ struct node *n;
if(head-> next == NULL)
{
printf(" there is only one node. The list can’t be made empty");
return;
}
else
{
n=head;
head=head->next;
free(n);
return;
}
}
/*function to print a linked list */
void printList(struct node *head)
{
while(head!= NULL)
{
printf("%d", head->data);
head= head->next;
}
printf("\n");
}
int main()
{
struct node *head =NULL;
insert_at_begin(&head,3);
insert_at_begin(&head,2);
insert_at_begin(&head,6);
insert_at_begin(&head,5);
printf(" given linked list:");
printList(head);
printf("deleting first node");
del_beg(head);
printf("modified linked list:");
printList(head);
}

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

Enter your choice


1
Enter the element to be inserted: 25
Do you wish to continue (Y/N)
Enter the element to be inserted: 65
Do you wish to continue (Y/N)
Enter the element to be inserted: 84
Do you wish to continue (Y/N)
Enter the element to be inserted: 36
Do you wish to continue (Y/N)
Enter the element to be inserted: 73
Do you wish to continue (Y/N)
The Stack is full
The Stack elements are: 25 65 84 36 73
Do you wish to continue (Y/N)
Enter your choice
2
The stack elements are: 25 65 84 36
Do you wish to continue (Y/N)
Q. Write a program to perform different operations on queue such as insert, delete and
display.

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>

int q[25], n ,front=-1 , rear=-1 , item;

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;

printf(“Enter the item : “);


scanf(“%d”,&item);
q[rear] = item;
printf(“%d is inserted\n\n”,item);

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;

printf(“Enter the size of the queue : “);


scanf(“%d”,&n);

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:

Enter the size of the queue : 4


1 : Insert
2 : Delete
3 : Print
Enter your choice : 1
Enter the item : 5
5 is inserted

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

You might also like