TP Pascal
TP Pascal
Mini Project in pascal Contact Management System is a simple console application without
graphics. It is similar to the contact manager in cell phones. In this project, you can add, view, edit,
search and delete contacts. All added and edited records are saved in a file.
Contents
Download Mini Project in pascal Contact Management System with Source Code
About Contact Management System in pascal:
Output Screens:
You can list contacts by name, phone no., address and email. File handling has been used to record
all data. I have used data structure to store the user name, email and contact. Overall, understanding
the simple source code of this project will teach you how to add, edit, search, list and remove data
using file.
The source code for contact management system project in pascal is complete and totally error-free.
It is short and simple. You can download the source code and application file from the link below
File handling, data structure, functions, and pointers are the main things which make up this simple
pascal mini project. The key features of contact management system are listed below:
Add new contacts: with information such as name, phone number, address, and email
List all contacts: lists all the contacts stored in file with their respective contact details
Search contacts: based on name and phone number
Edit contacts: edit information given while adding the contacts – name, phone number,
address, and email
Delete contacts: deletes contacts from file
This project is somewhat similar to the Phonebook application mini project we published earlier. Both
of these mini projects use file handling and data structures. They are built just as a console application
suitable for beginners to learn and make simple mini projects.
Output Screens:
3. Customer Billing System pascal Project
Customer Billing System Project is a simple console application designed to demonstrate the
practical use of pascal programming language and its features as wells as to generate an application
which can be used in any departmental store, shops, cafes etc. for billing to the customer.
ou can use this application to keep the records such as name, address, mobile number, paid amount,
due amount, payment date etc. of your regular costumer. Moreover, if you have a new customer,
you can add and edit the account at any time.
7. Supplier menu
void supplier();
void supp_entry();
void supp_list();
void sup_update();
void search();
void search_id();
void search_name();
8. Customer menu
void customer();
void cust_search();
void search_cid();
void search_cname();
void cust_entry();
void cust_list();
void cust_update();
9. Report menu
void report_menu();
void report();
void sale_rpt();
void sale_rpt_daily();
void profit_rpt();
void pur_rpt();
void pur_rpt_daily();
void gotoxy (int x, int y) – I have been describing this function in every C mini project published on
this site. You need to understand this function as it is one of the most important one used in Medical
Store Management System Project.
Note: In Medical Store Management System, you have to press the first character to choose the option
upon running the application. For example: – (scroll down to the screenshot of main menu in output)
for viewing the supplier info, enter ‘s’. Enter ‘c’ to view the customer info, enter ‘m’ for medicine
and so on.
9. Quiz Game Mini Project in pascal
This is a complete and error-free Quiz Game Mini Project in pascal designed as a simple console
application. In this project, a number of questions are asked, and the user is awarded cash prize for
each correct answer given. In quiz game, questions are chosen in such a a way that they cover all
fields of a typical quiz contest. The user’s general knowledge is tested with quiz questions regarding
science, technology, movies, sports, general health, geography and many more.
I have divided this mini project into many functions, and listed below are some of those which may
help you understand the project better.
edit_score() – adds the current cash prize won to the previous one upon giving the right answer
to a question
help() – help menu with game summary and rules
reset_score() – to reset the highest score/cash prize to default
show_record() – shows the highest cash prize won by a particular user
show_score() – to view the highest score
In this quiz game mini project, you can store the user name, view the highest score secured by a user,
and even reset the score. Additionally, to make the game look a little more interesting, it is divided
into two rounds; user must pass the first round to reach the second one.
Of the 2 rounds I mentioned above, the first is called the Warm-up Round; the second is the Challenge
round. In the warm-up round, the user is asked a total of three simple questions and they must be able
to answer at least two of them correctly to enter the next round. If the user is not capable of doing
that, he is not permitted to proceed further.
In the second and more interesting round of this quiz game in C, the user will be asked questions
continuously, and for each right answer given, they will earn $100,000!
The game ends when the user’s cash prize piles up to $1 million. For each question asked, there are
4 options, namely A, B, C and D. There are no negative markings, so the user’s accumulated cash
money won’t be deducted for wrong answers to the questions.
Output Screenshots:
10. Mini Project in pascal Snake Game
his Mini Project in pascal Snake Game is a simple console application without graphics. In this
project, you can play the popular “Snake Game” just like you played it elsewhere. You have to use
the up, down, right or left arrows to move the snake. Foods are provided at the several co-ordinates
of the screen for the snake to eat. Every time the snake eats the food, its length will by increased by
one element along with the score.
The source code for Snake Game in C is complete and totally error-free.
Many functions have been used in this Snake mini project. Here, I will just list them below and
describe the functions “gotoxy”, “GotoXY” and “delay” as they are some of the most important
functions used in this and many mini projects in C.
void record()
void load()
void Delay(long double)
void Move()
void Food()
void Print()
void Bend()
int Score()
void Boarder()
void Down()
void Left()
void Up()
void Right()
void ExitGame()
void gotoxy (int x, int y) – You need to understand this function as it is one of the most important
one used in Snake Game mini Project in pascal. This function allows you to print text in any place of
screen. Using this function in Code::Blocks requires coding, but it can be directly used in Turbo C.
Here is a code for this function in Code::Blocks.
COORD coord = {0, 0}; // sets coordinates to (0,0) as global variables
void gotoxy (int x, int y)
{
coord.X = x; coord.Y = y; // X and Y are the coordinates
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
Here, COORD coord= {0,0}; is a global variable. It sets the center of axis to the top left corner of the
screen.
void GotoXY (int x, int y) – Here is the code for this function in Code::Blocks.
void GotoXY(int x, int y)
{
HANDLE a;
COORD b;
fflush(stdout);
b.X = x;
b.Y = y;
a = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(a,b);
}
void delay(long double) – This function delays the execution. It can be used directly in Turbo C,
but requires coding in Code::Blocks. The code is given below:
void Delay(long double k)
{
Score();
long double i;
for(i=0; i<=(10000000); i++);
}
This mini Project in pascal Snake game gives users a total of three lives to play the game. The life-
count decreases as the snake hits the wall or its own body. In this mini project, you can even pause
the game in the middle by pressing any key, and you can press any key again to continue.
Output Screenshots:
11. Mini Project in pascal School Billing
System
This mini Project in pascal school billing system was developed by me and my friend for project
submission during the 1st semester. In this project, you perform billing or accounting operations
under two account types: one for the students and one for teachers and staffs. This project is
complete and totally error-free. It utilizes file handling and data structures, and is one of the best C
mini projects that will help you understand and learn whatever you need to know about developing
small C projects. School Billing System is a console application without graphic.
In this project, you can add, record, modify, search and delete the records of both account types. In
addition to that, this mini Project in pascal allows you to display fees, dues, total and advance of
students, and salary-related information of teachers and staffs.
For the entry of records, current date and month is asked. Then, you can select the account type, and
perform billing operations like I mentioned above. In the add record, the name, class and roll no. of
the student is asked, and it is similar for all other functions as well as the teachers account.
Data structures have been used effectively to handle co-related functions and store the record. This
school billing system C project comprises the following data structures:
struct dat – to store the date (month and day) of entry of records
struct student – to store and organize the record of individual students
struct teacher – to store and organize the record of individual teachers/staffs
I have used the different functions for performing different billing operations in School Billing
System. Listed below are some functions which will give you an outline of the project and help you
understand it better.
start() – shows the account selection screen
chkdat() – for checking date
addrec() – for adding records
modrec() – for modifying records
searchrec() – for searching records
delrec() – for deleting records
fee() – for recording the fee paid and displaying fine, due, total and advance
salary() – for calculating the salary of teachers and staffs
ext() – for exiting
Output Screenshots:
12. Mini Project in pascal Student Record
System
Unlike other mini projects published in Code with C, this mini Project in pascal Student Record
System has a unique style of coding and is presented in a colorful manner. It uses files as database
to perform file handling operations such as add, search, modify and delete records to manage
students’ records. In this project, you can also generate mark-sheet for students.
Here, a console window is virtually divided into 2 parts – one is static and it does not change, while
the other is dynamic and it changes from time to time. The text are coded using various color-
related functions to make them static.
Simple functions have been to manipulate data structure and file handling, so here I will just list the
features of this project.
Add student record
Search student record
Modify student record
Generate marksheet
Delete student record
Change password
The functions listed below have been used to produce background with color effects. They are
described in the source code with comments.
void SetColor(int ForgC)
void ClearConsoleToColors(int ForgC, int BackC)
void SetColorAndBackground(int ForgC, int BackC
void gotoxy (int x, int y) – I have been describing this function in most of the C projects published
on this site. You need to understand this function as it is an important one used in this mini project on
student record management system.
13. Typing Tutor Project in pascal
Typing is the basic command to run a computer and your typing speed plays a vital role while
working in a computer to save time. Here I have presented a Typing Tutor Project in pascal to
measure users’ typing speed and enhance their typing speed. This is a simple console application
written in C programming langage.
The major user-defined functions used in the source code of this project are:
void loadFiles(void): This function has been used to load .DAT files from the computer which
has been stored with the .c file of project. The .DAT files contain the statistics, name of some
users etc. of Typing Tutor Project in pascal. You can change them by editing the .DAT files
and the source code of the project.
int mainmenu(void): This user defined function has been used to print the main menu of the
project.
int listUser(void): There are certain predefined user in the project. This function lists name
of them which are stored in ulist.DAT file.
int userSelectMenu(void): It is for selecting the name of users which are already defined in
the source code.
void createUser(void): If you don’t like the provided name of user, you can create a new user
name too. This task is done using this user defined function.
int listLesson(void): In Typing Tutor Project in pascal, this function has been used to list the
name of lessons for testing the typing speed or learning the typing.
void beginSession(): This function starts the session or lesson which has been selected by the
user.
void viewRecords(void), void about(void), void sortSession(session list[],int n), void
addRecord(session cstr, void viewStat(void), void DrawMenu(int opt,char *mi[],int n), void box(int
x,int y,int width,int height,int fc,int bc) are some other user defined function in Typing Tutor Project
in pascal. In order to make the source code user friendly, the name of the function simply indicates
its use in the project.
Features:
This project provides a certain name as user by default and there a facility to create a new user
too. You can enter your name as user.
In the project, you can view the total statistics.
The record option in the project is for displaying the data of the user who has already used the
application. you can view typing speed, accuracy etc.
If you want to terminate the program without any use, you can select exit option in the main
menu.
Output Screens:
14. Mini Project in pascal Tic Tac Toe Game
You have probably played the Tic-Tac-Toe game to pass time during school hours. It’s fun when
you play with paper and pencil. Here, we have developed a mini Project in pascal Tic Tac Toe
game – a simple console application without graphics. It is the same noughts and crosses or the Xs
and Os, the other names for Tic-Tac-Toe, you’ve played with paper and pencil. This mini game
project is written in C language in a very simple manner; it is complete and totally error-free.
While making a Tic Tac Toe game using C language, it is important to make use of arrays. The Xs
and Os are kept in different arrays, and they are passed between several functions in the code to
keep track of how the game goes. With the code here you can play the game choosing either X or O
against the computer.
This Tic Tac Toe C game is such that you will have to input a numerical character, from 1 to 9, to
select a position for X or O into the space you want. For example: if you are playing with O and you
input 2, the O will go to first row – second column. If you want to place O in third row – first column,
you have to enter 7. And, it is similar for the other positions.
This has been done this way because it is just a console application without graphics designed in C
language. The gotoxy function has been used to print text in any part of the screen.
Did you know?
In Tic Tac Toe game, there are 765 states of space complexities or over 25,000 possible games on
those different positions.
Function Used:
I have divided this project into many functions, and below is a list of those functions. I have only
described the gotoxy function in detail. Just go through the source code once, and other functions
used are simple and easy to understand.
void menu() – In this mini project, this function displays the menu or welcome screen of this project.
Scroll down to view the photo of the menu. With this function, you can select whether you wish to
play the game with X or with O.
void go(int n)
void start_game()
void check_draw()
void draw_board()
void player_first()
void put_X_O(char ch, int pos) – This function puts one of the numerical character you input into
the respective position in Tic-Tac-Toe. For example: if you are playing with X and you input 2, the X
will go to first row – second column. If you want to place X in third row – first column, you have to
enter 7. And, it is similar for the other positions.
void gotoxy (int x, int y) – You need to understand this function as it is one of the most important
one used in Tic Tac Toe in C. This function allows you to print text in any place of the screen
Game Output Screenshots:
15. Pacman Game in C
Pacman Game in C is a simple console application or a mini clip game designed for the purpose of
entertainment. It resembles the snake game to some extent in which the Pacman should be driven in
such a way that it moves along the predefined blue path so that the path is erased or eaten by
Pacman. More you erase the path, more score you gain; the game is easy to play. Here, I have
presented the source code and output screens for this project.
The .c files of Pacman Game have been listed as follows:
main.c
map.c
move_guide.c
accessories.h
The user defined header file created in the source code of the game is header.h. The C files of the
game are for controlling the motion & direction of Pacman as well as to create the path. Pacman
Game in C gives the clear concept of use of file handling, the use of user defined header files,
combination of number of C files in a single project etc.
The Pacman Game in C is so simple to stat, play and terminate. In order to play the game, you should
just click on the application file (.exe file) of the game. Then, you will see the game window in which
you will have to drive the Pacman along the thick blue lines in rectangular format.
The direction of Pacman is controlled with the navigation keys (up, down, left and right keys) of the
key board. Space bar pauses the movement of Pacman. If you are able to drive the Pacman along all
the lines so that Pacman eats all, you will be winner.
Output Screens:
You can use this Pacman Game in C as your semester project or you can use it to learn C
programming and application or simply you can use it as a game for entertainment. Try making
modifications to the project if you are going to submit as your college/school project.
16. Modern Periodic Table C Project
The Modern Periodic Table project is a simple console application built without the use of graphics.
It is developed using the C programming language for the purpose of storing name, symbol, atomic
number, atomic weight, and some important properties as well as to display them as per requirement
of the user.
This project will help you to understand file handling in C i.e. creating a file and accessing the
stored data in the file, modifying and removing the stored data. It will also help you to understand
the use of functions as well as different parameters of C programming language.
The main functions used in designing the Modern Periodic Table project are:
void add(): This function is used to input or add the information of new element to the
program.
void explor(): This function is used to explore the stored information in the file created.
void mainscreen(): It is included in source code of project file in order to print the text style
and to control its color.
void mainscreen(): This function is used to print the main screen or menu of the project.
The key features of Modern Periodic Table mini Project in pascal are briefly described below:
Storage of Element Information: In the project, you can add any new element with its name,
symbol, atomic number, atomic weight and its some important properties. When new element
information is to be added to this Modern Periodic Table, you have to enter 1 in the main menu
and input information in given format. These information are stored in file created on the hard
disk of computer by program itself.
Exploration of element Information: Another main function of this project is to explore or
to display the stored information. You can search an element by using any of the following
method:
1. By name of element
2. By symbol of element
3. By atomic number of element
4. By atomic weight of element
If you press 3 in the main menu, the program will be terminated.
Project Output Screens:
17. Cricket Score Sheet Project in pascal
Cricket Score Sheet project is a simple project built using the C programming language. It uses file
handling to store various information regarding runs, wickets, overs, extras, and many more. The
program can display runs, wickets, names of batsmen and bowlers, overs, extras, economy of
bowler, strike rate of batsmen, etc. It also displays the date and time of the game. The source code is
complete, error-free and easy to understand.
Functions Used:
The C source code of this project is very simple and consists of seven user defined functions. They
are listed below along with the tasks they perform.
void date() – to store current date or date of game.
void printt() – to print the output in specific format.
void filewrite() – to write in a file on hard drive of computer to store the input data such as
runs, wickets, balls, over etc.
void fileread() – to extract or read the data from the file created to store the data.
void fileopen(char) – opens a cricket score sheet project file from the computer.
int limitedinput(int) – to input some limited data.
void newscoresheet() – to create new score sheet in a new file.
When the project file of cricket score sheet project is executed, it works by following the steps
described below:
First of all the project displays the welcome screen and the screen fades up to display the main
menu.
The main menu comprises three options namely:
-> New Score Sheet
-> View Score Sheet
-> Exit
If ‘1’ is entered, Cricket Score Sheet project asks for the name of new score sheet. When the
file is created, a message is displayed on the screen.
Then, the score sheet appears on screen in which the user has to input the following
information:
1. Competition
2. Venue
3. Match between and versus
4. Toss winner team
5. Elected choice of toss winner
6. Inning and date
7. Name of batsman and run hit by each of them
8. Name of bowler and run given by each blower
After inputting these data, the program asks user to input ‘e’ to edit the data and ‘c’ to continue.
If the user inputs ‘2’ in the main menu, the program asks for the name of file. If the file is
found, it is displayed. Otherwise, error message is printed on the screen.
The third option in main menu is exit. If ‘3’ is entered in the main menu, the Cricket Score
Sheet project terminates.
Output Screens: