Giter Site home page Giter Site logo

vinimiraa / c-crud Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 43 KB

A simple C console application showcasing CRUD operations for managing vehicle information in a user-friendly manner.

License: GNU General Public License v3.0

C 100.00%
c cprogramming cproject crud

c-crud's Introduction

Vehicle CRUD Project

This project consists of a CRUD (Create, Read, Update, Delete) system to manage vehicle information. The implementation is in the C language and follows a modular structure to facilitate code maintenance and expansion.

Project Structure

  • src/: Folder containing the project source code.

    • main.c: Contains the main function, which initializes the program, reads vehicle data from the file, displays the main menu, accepts user input, and writes vehicle data back to the file.
  • lib/: Folder containing project modules.

    • menu.h and menu.c: Define and implement functions related to the main menu of the program.

    • crud.h and crud.c: Define and implement functions related to vehicle manipulation (add, edit, delete, etc.).

  • test/: Folder containing tests or files related to tests.

    • vehicle.txt: General file used in tests.

    • vehicle.txt: File with vehicle data used in tests.

  • app/: Folder containing the program executable.

    • program: Executable generated after compilation.

Compilation and Execution

To compile the project, use the following command:

  • On Linux:

gcc lib/*.c src/*.c -o app/program

To run the program:

./app/program
  • On Windows:

gcc lib/*.c src/*.c -o app/program

To run the program:

cd app
program

Features

The program offers the following functionalities:

  1. List all vehicles.
  2. Search for a vehicle by plate.
  3. Add a new vehicle.
  4. Edit information of an existing vehicle.
  5. Delete a vehicle.

Data File

Vehicle data is stored in the vehicle.txt file. This file is read at the program's startup and updated at the end of the program's execution.

Notes

  • Make sure to have a C compiler installed on your system (e.g., GCC).

  • Vehicle data is stored in an array structure, and the program handles a maximum of 100 vehicles.

c-crud's People

Contributors

vinimiraa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.