# Password Generator 🔑
### **Project Description** 📜
This project is a simple password generator written in C. It generates random passwords of a specified length, containing uppercase and lowercase letters, numbers, and symbols. The generated passwords are then saved to a file named "passwords.txt". This is useful for creating strong, unique passwords for various online accounts, enhancing security.
### **Installation Instructions** 💾
1. **Save the code:** Copy the provided C code and save it as a `.c` file (e.g., `password_generator.c`).
2. **Compile the code:** Open a terminal or command prompt and navigate to the directory where you saved the file. Compile the code using a C compiler (like GCC):
```bash
gcc password_generator.c -o password_generator
- (Optional) Install a C compiler: If you don't have a C compiler, you'll need to install one. For example, on Debian/Ubuntu systems, you can use:
sudo apt-get update sudo apt-get install build-essential
- Generates random passwords of specified length.
- Includes uppercase and lowercase letters, numbers, and symbols in the password character set.
- Allows the user to specify the number of passwords to generate.
- Saves the generated passwords to a text file ("passwords.txt").
- Provides error handling for invalid input (number of passwords and password length).
- Run the executable: After successful compilation, run the executable from your terminal:
./password_generator
- Enter inputs: The program will prompt you to enter the number of passwords to generate and the desired length of each password.
- View output: The generated passwords will be displayed on the console and saved to the
passwords.txt
file.
- A C compiler (like GCC).
- Standard C libraries (
stdio.h
,stdlib.h
,time.h
).
# Compile the code
gcc password_generator.c -o password_generator
# Run the executable
./password_generator
Feel free to open a pull request or suggest improvements! All contributions are welcome.
Developer: Sunny | GitHub: JustM3Sunny