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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:
    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:
    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:

    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.

About

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.


Languages

Language:C 100.0%