Final Dsu Microproject

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 26

JSPM’s

JAYAWANTRAO SAWANT
POLYTECHNIC, Handewadi Road,
Hadapsar, Pune-28
Department of Computer Engineering
Academic Year 2022-23

MICRO PROJECT
Academic year: 2023-24

C program for implement stack by


using linked list
…………………………………………
……
Program: CO Program code:CO3I
Course: DSU
Course code: 22317
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
This is to certify that Ms. Samiksha Deepak Sing,
Snehal Shital Shahane, Priyanaka Santosh More, Zeba Fateema
Inayat Shaikh having Roll No. 87,117,127,132 of III - Semester of
Diploma in computer engineering of Institute, Jaywantrao Sawant
POLYTECHNIC (Code: 0711) has completed the Micro Project
satisfactorily in Subject – DSU(22318)for the academic year 2023 -
2024 as prescribed in the curriculum.

Place: Hadapsar,Pune Enrollment No: 2207110401, 2207110436, 2207110448,


2207100172

Date: ……….…….. Exam. Seat No: ………………… ……………………….

Subject Teacher Head of the Department Principal


Group Details:

Sr.No Name of Roll No Enrollment Seat No


group No
members

1 SAMIKSHA 87 2207110401
DEEPAK
SING
2 SNEHAL 177 2207110436
SHITAL
SHAHANE
3 PRIYANKA 127 2207110448
MORE
4 ZEBA 132 2207100172
SHAIKH

Name Of Guide: Mrs.A.R.Mohite


INDEX

SR.NO CONTENT PAGE NO.


.
ABSTRACT 1
1

Introduction to project 2
2

PROJECT ABSTRACT 3
3

Algorithm 4
4

Flowchart 5
5

6 Program 8

7 CONCLUSION 12
JSPM’s
JAYAWANTRAO SAWANT POLYTECHNIC,
Handewadi Road, Hadapsar, Pune-28
Department of Computer Engineering
Academic Year 2022-23

Title of Micro project: C program for implemente stack using linked


list

Brief Introduction: Stack is a linear data structure that follows the Last in,
First out principle(LIFO). Stack supports various operations like push, pop, peek,
empty, and size. It can be implemented using an array and linked list. The benefit
of implementing a stack using a linked list in C over arrays is that it allows to
grow of the stack as per the requirements, i.e., memory can be allocated
dynamically.

Aim of Micro Project:- it allows to grow of the stack as per the


requirements, i.e., memory can be allocated dynamically.
W3.0 Action Plan (Sequence and time required for major activities for 8 week)
Sr. Details of activity Planned Planned Name of
No start Finish date Responsible Team
date members
1 Collecting the information of
view Priyanka more
2 Sorting the information of Zeba shaikh
view
3 Compilation of the project
4 Submission of the project
4.0 Resources required (major resources such as raw material, some machining facility,
software etc.)

Sr. Name of Specification Quantit


N resource / y Remark
O material s
1 COMPUTE WORD DOCUMENT 1
R
2 GOOGLE WEBSITE(WIKIPEDIA OF SMPS) 1
3 WEBSITE https://en.wikipedia.org/wiki/ 2
passivecomponents

PROJECT ABSTRACT

We already knew that linked lists allocate memory dynamically. Stack


implementation using linked-list, the nodes are maintained in non-
contiguous memory. Each node contains a pointer to the immediate next
in line node in the Stack.

In Stack, implementation using Linked-List, every new element inserted


to the top of the Stack which means every new inserting element pointed
by the top and whenever we want to delete element from the Stack
which is pointing to the top of the Stack by moving the top by moving
top to is the previous node in the linked -list. The following field of the
first element must always be NULL. There is an overflow condition in
the Stack if the space left in the memory heap is not sufficient to create a
node
ALOGORITHM FOR PUSH AND POP
OPERATION:

push()

• Create a newNode with the given data.


• Check whether the stack is empty (TOP == NULL).
• If it is empty, then set the pointer of the node to NULL.
• If it is not empty, then make the node point to TOP.
• Finally, make the newNode as TOP.

pop()

• Check whether stack is empty (top == NULL).


• If it is empty, then display "EMPTY STACK"
• If it is not empty, then create a temporary node and set it to TOP.
• Print the data of TOP.
• Make TOP to point to the next node.
• Delete the temporary node

FLOWCHART FOR PUSH( ) AND POP( ):


Program :
#include<stdio.h>
#include<stdlib.h>

/* Structure to create a node with data and pointer */

struct Node
{
int data;
struct Node *next;
}*top = NULL; // Initially the list is empty

void push(int);
void pop();
void display();

int main()
{
int choice, value;
printf("\nIMPLEMENTING STACKS USING LINKED LISTS\n");
while(1){
printf("1. Push\n2. Pop\n3. Display\n4. Exit\n");
printf("\nEnter your choice : ");
scanf("%d",&choice);
switch(choice)
{
case 1: printf("\nEnter the value to insert: ");
scanf("%d", &value);
push(value);
break;

case 2: pop();
break;

case 3: display();
break;

case 4: exit(0);
break;

default: printf("\nInvalid Choice\n");


}}}

void push(int value)


{
struct Node *newNode;
newNode = (struct Node*)malloc(sizeof(struct Node));
newNode->data = value; // get value for the node
if(top == NULL)
newNode->next = NULL;
else
newNode->next = top; // Make the node as TOP
top = newNode;
printf("Node is Inserted\n\n");
}

void pop()
{
if(top == NULL)
printf("\nEMPTY STACK\n");
else{
struct Node *temp = top;
printf("\nPopped Element : %d", temp->data);
printf("\n");
top = temp->next; // After popping, make the next node as TOP
free(temp);
}}

void display()
{
// Print the stack
if(top == NULL)
printf("\nEMPTY STACK\n");
else
{
printf("The stack is \n");
struct Node *temp = top;
while(temp->next != NULL){
printf("%d--->",temp->data);
temp = temp -> next;
}
printf("%d--->NULL\n\n",temp->data);
}}
OUTPUT:
Pushing elements into the stack

Popping elements from the stack


CONCLUSION
• Stack is a linear data structure that follows the Last in,
First Out Principle (LIFO).
• Stack can be represented using nodes of a linked list.
• Stack supports operations such as push, pop, size,
peek, and is Empty.
• Elements can be pushed or popped from one end
only.
• Push and Pop operations take O(1) time.

Teachers Evoluation Sheet


Name of the student: samiksha sing Enrollment No:2207110401
Academic Year: 2023-24 Name of the Faculty: MRS.A.R.MOHITE
Course:DSU Course code: 22317 Semester: III
Title of the project: Implement stack using linked list
Course outcome achived:
A: We learned to write c programs.
B: use stack operation by using linked list

Evaluation as per suggested Rubric for Assessment of Micro Project


Sr. Characteristic to be Poor Average Good Excellent
No assessed (Marks1- (Marks 4-5) (Marks6-8) (Marks 9-10)
3)
1 Relevance to the course
2 Literature Survey /
Information collection
3 Project Proposal
4 Completion of the Target as
per Project Proposal
5 Analysis of data and
representation
6 Quality of Prototype/ Model
7 Report preparation
8 Presentation
9 Defense

Micro Project Evaluation Sheet


Process Assessment Product Assessment Total
Part A - Project Project Par B - Project Individual Marks
Proposal Methodology Report/ working Presentation/ Viva 10
Model
(2 Marks) (2 Marks) (4 Marks)
(2 Marks)

Note: Every course teacher is expected to assign marks for group evaluation in first 3
columns and individual evaluation 4th column

Comment/ suggestion about team work/leadership/ interpersonal communication (If any)


………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………
………………………………………………………………………………………………………
……………………………………
Any other comment:
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
…………….

Name and Designation of the Faculty Member:Ms.A.R..MOHITE

Signature: ………………………

Teachers Evoluation Sheet


Name of the student: Priyanka more Enrollment No:2207110448
Academic Year: 2023-24 Name of the Faculty: MRS.A.R.MOHITE
Course:DSU Course code: 22317 Semester: III
Title of the project: Implement stack using linked list
Course outcome achived:
A: We learned to write c programs.
B: use stack operation by using linked list

Evaluation as per suggested Rubric for Assessment of Micro Project


Sr. Characteristic to be Poor Average Good Excellent
No assessed (Marks1- (Marks 4-5) (Marks6-8) (Marks 9-10)
3)
1 Relevance to the course
2 Literature Survey /
Information collection
3 Project Proposal
4 Completion of the Target as
per Project Proposal
5 Analysis of data and
representation
6 Quality of Prototype/ Model
7 Report preparation
8 Presentation
9 Defense

Micro Project Evaluation Sheet


Process Assessment Product Assessment Total
Marks
Part A - Project Project Par B - Project Individual
Proposal Methodology Report/ working Presentation/ Viva 10
Model
(2 Marks) (2 Marks) (4 Marks)
(2 Marks)

Note: Every course teacher is expected to assign marks for group evaluation in first 3
columns and individual evaluation 4th column

Comment/ suggestion about team work/leadership/ interpersonal communication (If any)


………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………
………………………………………………………………………………………………………
……………………………………
Any other comment:
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
…………….

Name and Designation of the Faculty Member:Ms.A.R..MOHITE

Signature: ………………………
Teachers Evoluation Sheet
Name of the student: zeba shaikh Enrollment No:2207100172
Academic Year: 2023-24 Name of the Faculty: MRS.A.R.MOHITE
Course:DSU Course code: 22317 Semester: III
Title of the project: Implement stack using linked list
Course outcome achived:
A: We learned to write c programs.
B: use stack operation by using linked list

Evaluation as per suggested Rubric for Assessment of Micro Project


Sr. Characteristic to be Poor Average Good Excellent
No assessed (Marks1- (Marks 4-5) (Marks6-8) (Marks 9-10)
3)
1 Relevance to the course
2 Literature Survey /
Information collection
3 Project Proposal
4 Completion of the Target as
per Project Proposal
5 Analysis of data and
representation
6 Quality of Prototype/ Model
7 Report preparation
8 Presentation
9 Defense
Micro Project Evaluation Sheet
Process Assessment Product Assessment Total
Marks
Part A - Project Project Par B - Project Individual
Proposal Methodology Report/ working Presentation/ Viva 10
Model
(2 Marks) (2 Marks) (4 Marks)
(2 Marks)

Note: Every course teacher is expected to assign marks for group evaluation in first 3
columns and individual evaluation 4th column

Comment/ suggestion about team work/leadership/ interpersonal communication (If any)


………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………
………………………………………………………………………………………………………
……………………………………
Any other comment:
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
…………….

Name and Designation of the Faculty Member:Ms.A.R..MOHITE

Signature: ………………………
Teachers Evoluation Sheet
Name of the student: snehal shahane Enrollment No:2207110436
Academic Year: 2023-24 Name of the Faculty: MRS.A.R.MOHITE
Course:DSU Course code: 22317 Semester: III
Title of the project: Implement stack using linked list
Course outcome achived:
A: We learned to write c programs.
B: use stack operation by using linked list

Evaluation as per suggested Rubric for Assessment of Micro Project


Sr. Characteristic to be Poor Average Good Excellent
No assessed (Marks1- (Marks 4-5) (Marks6-8) (Marks 9-10)
3)
1 Relevance to the course
2 Literature Survey /
Information collection
3 Project Proposal
4 Completion of the Target as
per Project Proposal
5 Analysis of data and
representation
6 Quality of Prototype/ Model
7 Report preparation
8 Presentation
9 Defense
Micro Project Evaluation Sheet
Process Assessment Product Assessment Total
Marks
Part A - Project Project Par B - Project Individual
Proposal Methodology Report/ working Presentation/ Viva 10
Model
(2 Marks) (2 Marks) (4 Marks)
(2 Marks)

Note: Every course teacher is expected to assign marks for group evaluation in first 3
columns and individual evaluation 4th column

Comment/ suggestion about team work/leadership/ interpersonal communication (If any)


………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………
………………………………………………………………………………………………………
……………………………………
Any other comment:
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
…………….

Name and Designation of the Faculty Member:Ms.A.R..MOHITE

Signature: ………………………

You might also like