Professional Documents
Culture Documents
Dsu Report
Dsu Report
Micro-Project
Report
Title: Movie Ticket Booking.
Brief Description:-
Data Structures in C are used to store data in an organized and efficient manner. The C
Programming language has many data structures like an array, stack, queue, linked list,
tree, etc. A programmer selects an appropriate data structure and uses it according to
their convenience.
It is also used for processing, retrieving, and storing data. There are different basic and
advanced types of data structures that are used in almost every program or software
system that has been developed. So, we must have good knowledge about data
structures.
Data structure is mainly classified in two types as Linear Data Structure and Non-Linear
Data structure. In which Linear data structure is classified in following parts-
ARRAY-
An array is a collection of data of similar data type in which each element is stores
sequentially.
An array element can be accessed by its array index only.
STACK-
A Stack is the one of the most efficient non-primitive linear data structures.
Implementation of most of system is based on Stack data structure. Stack data structure
uses the principal of LIFO i.e., last in first out.
QUEUE-
A queue is linear list of elements in which insertion of a new element and deletion of
element takes at two different ends called Rear and Front respectively. Queue uses the
principal of FIFO i.e., first in last out.
LINKED LIST-
A Linked list is a collection of data item/elements in which each data is called as Node,
where the linear order of elements is maintained by means of pointer. A node in linked
list is basically has two fields in it as data field and next pointer field which does the
work storing the element and memory address of next element in it.
sometimes also referred to as nodes and the edges are lines or arcs that connect any two
nodes in the graph. More formally a Graph is composed of a set of vertices (V) and a set
of edges (E). The graph is denoted by G (E, V).
Not only these types, but data structure has multiple types of itself or classified into
multiple types the above all data structures are mostly and commonly used in daily life.
Introduction:-
In this project , we have coded program as an example to represent “Movie ticket booking”.
As per our requirement we used structure.
Structure is user defined data type which stores different types of data. We used struct
movie which contains name, mobile No. and seat No. This project also contains linear
searching technic.
Customers can book movie tickets and view all of the movies playing in the cinema hall
through this project, which allows them to book tickets at any time and from anywhere.
The movie ticket reservation system was created with this in mind.
Providing customers with service to book a seat in the cinema hall and information about
the films at any time and from any location. The consumer may simply learn about the
movies that have been released and then make a decision. We will demonstrate our system
in this project by using the C programming language.
We used linear searching technic . it takes customer name as input and searches the name
in overall struct’s object.
2
Sharad Institute of Technology, Polytechnic | SY CO A
Aim of Project:
The aim of the project is to understand the concept of linear search by using
movie ticket booking system.
Literature Review:
Data structures are one among the most fundamental concepts for a programmer. The
implementation phase of any project would start off by the decision of data structure to be
used. It gives an effective way for memory management and helps in analyzing the real-
world problems in a much simpler way.
Data structures are a conceptually demanding topic which confronts many Computer
Science students early in their course. The topic has a strong conceptual basis and often
proves difficult for many to grasp. A number of previous studies have examined that the
use of interaction and visualization within the systems can motivate a student to engage in
the learning process.
3
Sharad Institute of Technology, Polytechnic | SY CO A
4 https://www.geeksforg
Websites eeks.com 1 Yes
Data Structure
Using C
5 By
Reference Books Techmax 1 Yes
Publication.
4
Sharad Institute of Technology, Polytechnic | SY CO A
Source code :-
#include <stdio.h>
#include <conio.h>
#include <string.h>
printf("\n---------------------------------------------------------------------");
printf("\n\tSeat no.\t\tCustomer name.\t\tMobile no.\n");
printf("---------------------------------------------------------------------\n");
for (i = 0; i < n; i++)
{
printf("\t %d", i+1);
printf("\t\t\t %s", m[i].name);
printf("\t\t %s",m[i].mobile);
printf("\n");
}
}
}
void find()
{
char tmp;
if (total == 100)
{
printf("\n\nTheater is empty");
getch();
clrscr();
}
else
{
clrscr();
while (ch)
{
printf("\n\t\t\t\tM A I N M E N U\n");
printf("\n\t\t\t\t1.Book ticket\n\t\t\t\t2.View seats\n\t\t\t\t3.find your
seat\n\t\t\t\t4.Remaining seat\n\t\t\t\t5.Exit\n\t\t\t Enter your choice = ");
scanf("%d", &ch);
7
Sharad Institute of Technology, Polytechnic | SY CO A
switch (ch)
{
case 1:
bookm();
clrscr();
break;
case 2:
clrscr();
display();
getch();
clrscr();
break;
case 3:
find();
clrscr();
break;
case 4:
clrscr();
remaining();
/* printf("\n\t\t\tReamaining seats = %d", total);
printf("\n"); */
getch();
clrscr();
break;
case 5:
exit(0);
default:
printf("\nEnter valid");
}
}
getch();
}
END OF PROGRAM
8
Sharad Institute of Technology, Polytechnic | SY CO A
OUTPUT OF PROGRAM :
1) Main Window: –
2) Book ticket :-
9
Sharad Institute of Technology, Polytechnic | SY CO A
4) Finding Seat :-
10
Sharad Institute of Technology, Polytechnic | SY CO A
11