https://github.com/itaynir1/countchar
This project is a simple C program designed to analyze the frequency of lowercase letters in a text file. It prompts the user to input a filename, then reads the file character by character, counting the occurrences of each lowercase letter. Once the file is processed, it displays the total appearances of each lowercase letter in the file.
https://github.com/itaynir1/countchar
algorithms ascii-manipulation c-programming character-frequency command-line-interface file-handling input-validation text-analysis
Last synced: about 1 year ago
JSON representation
This project is a simple C program designed to analyze the frequency of lowercase letters in a text file. It prompts the user to input a filename, then reads the file character by character, counting the occurrences of each lowercase letter. Once the file is processed, it displays the total appearances of each lowercase letter in the file.
- Host: GitHub
- URL: https://github.com/itaynir1/countchar
- Owner: itaynir1
- Created: 2024-03-31T10:42:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-31T11:01:55.000Z (over 2 years ago)
- Last Synced: 2025-02-17T21:37:00.121Z (over 1 year ago)
- Topics: algorithms, ascii-manipulation, c-programming, character-frequency, command-line-interface, file-handling, input-validation, text-analysis
- Language: C
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# countChar
This project is a simple C program designed to analyze the frequency of lowercase letters in a text file. It prompts the user to input a filename, then reads the file character by character, counting the occurrences of each lowercase letter. Once the file is processed, it displays the total appearances of each lowercase letter in the file.
# Letter Frequency Counter
## Project Description
This project is a simple C program designed to analyze the frequency of lowercase letters in a text file. It prompts the user to input a filename, then reads the file character by character, counting the occurrences of each lowercase letter. Once the file is processed, it displays the total appearances of each lowercase letter in the file.
## How to Use
1. **Clone the Repository:**
```bash
git clone https://github.com/your-username/letter-frequency-counter.git
```
2. **Navigate to the Project Directory:**
```
cd letter-frequency-counter
```
3. **Compile the Program:**
```bash
gcc letter_frequency.c -o letter_frequency
```
4. **Run the Program:**
```
./letter_frequency
```
5. Follow the On-Screen Instructions:
* Enter the filename you want to analyze when prompted.
* The program will display the total appearances of each lowercase letter in the file.
## Example Usage:
```c
Enter a filename you want to test: sample.txt
Total Appearances of Lowercase Letters in file 'sample.txt' :
Letter 'a' appears '5' times
Letter 'b' appears '3' times
Letter 'c' appears '0' times
Letter 'd' appears '1' times
...
```
### Contributing
Contributions are welcome! If you'd like to improve this program, feel free to fork the repository and submit a pull request with your changes.