Skip to content

i-JayshreeChauhan/Project__Auto_bill_receipt_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AUTO BILL RECEIPT GENERATOR

Developed By: Jayshree Chauhan


Aim

The aim of this project is to develop an automatic bill receipt generator using a predefined file template.


Key Concepts Demonstrated

This project showcases the use of the following C programming concepts:

  • File I/O: Reading from and writing to files.
  • Pointers: Efficient memory management and data manipulation.
  • Strings: Handling and manipulating text data.
  • Functions: Modularizing the code into reusable blocks.
  • Dynamic Memory Allocation: Allocating and reallocating memory dynamically to handle varying data sizes and ensure efficient memory usage.

Project Description

In this project:

  1. A bill template is referenced from a file (BillTemplate.txt), which serves as the base structure for the receipt.
  2. The user is prompted to input their name.
  3. Additional predefined strings, such as the company name, bill amount, and outlet name, are incorporated into the receipt.
  4. A new string is generated by combining the user input and predefined data.
  5. The updated data is saved in a new file, creating a complete and personalized bill receipt.

How to Run

  1. Clone the repository or download the source code.
  2. Ensure the file BillTemplate.txt exists in the same directory as the program.
  3. Compile the C program using any standard C compiler (e.g., GCC).
    gcc Auto_Bill_Generator.c -o Auto_Bill_Generator
  4. Run the executable:
    ./Auto_Bill_Generator
  5. Follow the on-screen instructions to input your name and generate the bill receipt.

Example Template File (BillTemplate.txt)

------------------| [CUSTOMER_NAME]'s Bill |------------------

Company Name: [COMPANY_NAME]
Outlet: [OUTLET_NAME]

Customer Name: [CUSTOMER_NAME]
Bill Amount: [BILL_AMOUNT] Rs.

Thanks [CUSTOMER_NAME] for your purchase! Do visit again.

Sample Output

When the program runs, it will generate a new file like this:

Generated File: bill.txt

------------------| Jayshree Chauhan's Bill |------------------

Company Name: GRUB GARAGE
Outlet: BARODA OUTLET

Customer Name: Jayshree Chauhan
Bill Amount: 1000.0 Rs.

Thanks Jayshree Chauhan for your purchase! Do visit again.

Feel free to contribute to this project or suggest improvements!

About

This project develops an automatic bill receipt using a predefined file template.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages