0% found this document useful (0 votes)
20 views

Black Modern Gradient Programmer Presentation

The Railway Ticket Booking System is a console-based application developed in C that facilitates railway ticket reservations through a menu-driven interface. It employs data structures such as linked lists to dynamically manage bookings and train information, addressing inefficiencies in manual ticketing. Key features include booking and canceling tickets, checking train schedules, and viewing ticket status.

Uploaded by

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

Black Modern Gradient Programmer Presentation

The Railway Ticket Booking System is a console-based application developed in C that facilitates railway ticket reservations through a menu-driven interface. It employs data structures such as linked lists to dynamically manage bookings and train information, addressing inefficiencies in manual ticketing. Key features include booking and canceling tickets, checking train schedules, and viewing ticket status.

Uploaded by

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

RAILWAY TICKET

BOOKING SYSTEM
K.Jayanth
Md.Muneeb-Ur-Rahman
M.Nitai
Surya Harsha

-
ABSTRACT

The Railway Ticket Booking System project is a console-


based application developed using C language in Data
Structures. This system provides a simple and efficient way
to manage railway ticket reservations using structures,
linked lists, and file handling. It allows users to book tickets,
cancel bookings, check train schedules, and view ticket
status—all via a menu-driven interface.
Using core data structure concepts like linked lists, this
project ensures dynamic management of tickets and trains
without any fixed-size limitations.
BACKGROUND
ndian Railways manages one of the world’s largest rail
networks and faces daily challenges in efficiently
handling passenger ticketing. Manual ticketing leads to
delays, overbooking, and user dissatisfaction.
This project provides an automated solution using
fundamental data structures to simulate a railway
booking system, focusing on clarity, modularity, and
efficient data handling.
OPERATIONS
•⁠ ⁠Book Ticket
•⁠ ⁠Cancel Ticket
•⁠ ⁠Check Available Trains
•⁠ ⁠View Booked Ticket (using PNR)
•⁠ ⁠Exit
DATA
STRUCTURES
Data Structures Used:
•⁠⁠Structures: To define passenger and train details
•⁠⁠Linked List: To manage dynamic list of bookings
•⁠ ⁠File Handling (optional): To save ticket data
persistently
SOFTWARE & HARDWARE
REQUIREMENTS
•⁠ ⁠Language: C
•⁠ ⁠Compiler: GCC / Turbo C
•⁠ ⁠IDE: Code::Blocks / Dev C++ / VS Code
•⁠ ⁠OS: Windows/Linux
•⁠ ⁠RAM: Minimum 2GB
FLOW CHART
CODE
STRUCTURE DEFINITIONS (in C)
struct Passenger {
int pnr;
char name[50];
int age;
char train_no[10];
struct Passenger* next;
};

struct Train {
char train_no[10];
char train_name[50];
char source[30];
char destination[30];
int seats;
};
______________________________________
SAMPLE FUNCTION HEADERS
void displayTrains();
void bookTicket();
void cancelTicket(int pnr);
void viewTicket(int pnr);
void mainMenu();
CODE
SAMPLE FUNCTION HEADERS
void displayTrains();
void bookTicket();
void cancelTicket(int pnr);
void viewTicket(int pnr);
void mainMenu();
__________________________________
____
SOURCE CODE :
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#define MAX_TRAINS 5
#define SEATS_PER_TRAIN 10
#define WAITING_LIST_SIZE 10

typedef struct Booking {


int bookingID;
char passengerName[50];
int trainID;
struct Booking *next;
} Booking;

typedef struct Waiting {


char passengerName[50];
int trainID;
struct Waiting *next;
} Waiting;
Thank You
-

You might also like