1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
QveST [7]
3 years ago
7

In c please

Computers and Technology
1 answer:
Paraphin [41]3 years ago
5 0

Answer:

#include <stdio.h>

#include <ctype.h>

void printHistogram(int counters[]) {

   int largest = 0;

   int row,i;

   for (i = 0; i < 26; i++) {

       if (counters[i] > largest) {

           largest = counters[i];

       }

   }

   for (row = largest; row > 0; row--) {

       for (i = 0; i < 26; i++) {

           if (counters[i] >= row) {

               putchar(254);

           }

           else {

               putchar(32);

           }

           putchar(32);

       }

       putchar('\n');

   }

   for (i = 0; i < 26; i++) {

       putchar('a' + i);

       putchar(32);

   }

}

int main() {

   int counters[26] = { 0 };

   int i;

   char c;

   FILE* f;

   fopen_s(&f, "story.txt", "r");

   while (!feof(f)) {

       c = tolower(fgetc(f));

       if (c >= 'a' && c <= 'z') {

           counters[c-'a']++;

       }

   }

   for (i = 0; i < 26; i++) {

       printf("%c was used %d times.\n", 'a'+i, counters[i]);

   }

   printf("\nHere is a histogram:\n");

   printHistogram(counters);

}

You might be interested in
The windows troubleshooting utility that identifies and eliminates nonessential files is called _____.
Virty [35]
I think it is Defragment
8 0
3 years ago
Read 2 more answers
What does it mean when #DIV/0! is displayed and a green triangle is added to the upper-left corner of a cell? A. The formula can
bazaltina [42]
The answer to the question is B.
4 0
4 years ago
Read 2 more answers
Zack wants to be a landscape designer.which qualification would be best prepare him for work in this career
katen-ka-za [31]
Landscape design or landscape horticulture. a bachelor degree for these.
4 0
3 years ago
Read 2 more answers
Which action should be done throughout the mail merge process
Wittaler [7]
C. Save and proof answe for apex. ;)

5 0
3 years ago
Read 2 more answers
11. Damaged seeds would ________ on top of water.
lakkis [162]

Answer:

11. FLOAT

12.Cholera is caused by ingestion of food or water contaminated with the bacterium Vibrio cholerae

13. ARTIFICIALLY FIBER or PETROCHEMICALS

14.HYDROGEN GAS

15.WATER

16. CLIMATIC CHANGES

17.PROKARYOTIC CELLS

18. PERIOD OR LEFT AND RIGHT SWINGS

19. EXPAND OR GETTING LARGER

20. FREQUENCY

5 0
3 years ago
Read 2 more answers
Other questions:
  • What finacial behaivor will typically lead to a low credit score
    8·1 answer
  • Which of the following is true of tape? Group of answer choices It is no longer used as a primary method of storage but is used
    10·1 answer
  • I need the alphabet quickly! sorry bad with remembering!
    10·1 answer
  • Magnetic energy can build up in the atmosphere of the sun. When this energy is finally released, it is 10 million times greater
    15·1 answer
  • Which statement accurately describes the process for storing AutoRecovered files?
    7·2 answers
  • Users report that the network access is slow. After questioning the employees, the network administrator learned that one employ
    10·1 answer
  • Research shows that a passive close to a cover letter leads to more interviews. Please select the best answer from the choices p
    8·2 answers
  • The code that is executed when the user clicks a button is known as ________.
    7·1 answer
  • How to enhance the video to full screen in filmora
    15·1 answer
  • Answer first get branlest
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!