Dsu Microroject
Dsu Microroject
DSU Microroject
ASTUDY ON
MICRO PROJECT
Submitted by 4 students
PROF.MS.TAMANNA SHAIKH
in
Three Years Diploma in Engineering & Technology of Maharashtra State Board of Technical
Education, Mumbai (Autonomous)
SO 9001:2008 (ISO/IEC-27001:2013)
At
1734 – TRINITY POLYTECHNIC PUNE
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
Certificate
Seal of Ins琀椀tute
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
INDEX
Sr No. Title
1. Introduction
2. Abstract
3. Information
4. Code
5. Conclusion
6. Reference
INTRODUCTION
1.key objective is to introduce the basic concepts of software design. At one-level this is C-
specific: to learn to design, code and debug complete C programs. At another level, it is more
general: to learn the necessary skills to design large and complex software systems. This
involves learning to decompose large problems into manageable systems of modules; to use
modularity and clean interfaces to design for correctness, clarity and flexibility
2.Like arrays, Linked List is a linear data structure. Unlike arrays, linked list elements are not
stored at a contiguous location; the elements are linked using pointers.
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
a)Linked List is a very commonly used linear data structure which consists of group
of nodes in a sequence.
b)Each node holds its own data and the address of the next node hence forming a chain like
structure.
ii
ABSTRACT
About Project
In the main() function, we created two linked lists and called the function find First
Common() to find the first common element.
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
-Hence we have selected this topic and perform program in visual studio code and learn the
process of develop a ‘c’ program to find the first common element between the 2 given linked
lists and perform it successfully
iii
INFORMATION
Linked List
o Linked List can be defined as collection of objects called nodes that are randomly
stored in the memory.
o A node contains two fields i.e. data stored at that particular address and the pointer
which contains the address of the next node in the memory.
o The last node of the list contains pointer to the null.
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
You have to start somewhere, so we give the address of the first node a special name
called HEAD. Also, the last node in the linked list can be identified because its next
portion points to NULL.
Linked lists can be of multiple types: singly, doubly, and circular linked list. In this
article, we will focus on the singly linked list.
We wrap both the data item and the next node reference in a struct as:
struct node
{
int data;
struct node *next;
};
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
2
CODE
#include <stdio.h>
#include <stdlib.h>
struct node
{
int num;
struct node *next;
};
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
int main()
{
struct node *p = NULL, *q = NULL;
int result;
display(q);
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
}
release (&p);
return 0;
}
while (p != NULL)
{
temp = q;
while (temp != NULL)
{
if (temp->num == p->num)
{
return p->num;
}
4
temp = temp->next;
}
p = p->next;
}
return 0;
}
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
int c, ch;
struct node *temp, *rear;
do
{
printf("Enter number: ");
scanf("%d", &c);
temp = (struct node *)malloc(sizeof(struct node));
temp->num = c;
temp->next = NULL;
if (*head == NULL)
{
*head = temp;
}
else
{
rear->next = temp;
}
rear = temp;
5
printf("Do you wish to continue [1/0]: ");
scanf("%d", &ch);
} while (ch != 0);
printf("\n");
}
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
printf("%d\t", head->num);
head = head->next;
}
printf("\n");
}
PROGRAM OUTPUT
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
CONCLUSION
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
9
REFERENCES
https://www.scaler.com/topics/number-guessi
Computer Department
Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738
10
TEAM W0RK
Computer Department
Downloaded by Mr R K ([email protected])