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
arsen [322]
3 years ago
7

(main.c File)

Computers and Technology
1 answer:
nlexa [21]3 years ago
7 0

Answer:

C code

Explanation:

#include <stdio.h>

void histrogram(int counters[])

{

   int i,j;

   int count;

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

   {

       count=counters[i];

       printf("%c ",i+97);

       for(j=0;j<count;j++)

       {

           printf("="); //= is used

       }

       printf("\n");

      

   }

      

}

int main()

{

   FILE* fp;

   int i;

   int arr[26];

   char c;

   int val;

   // Open the file

fp = fopen("story.txt", "r");

  

if (fp == NULL) {

printf("Could not open file ");

return 0;

}

else

{

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

   arr[i]=0;

  

   for (c = getc(fp); c != EOF; c = getc(fp))

   {

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

       {

           val = c-97;

           //printf("%d ",val);

           arr[val]++;

          

           }

       }

       histrogram(arr);

      

  

      

  

   }

}

You might be interested in
What does FTTB mean?
EleoNora [17]

  • <em><u>Fiber to the building</u></em>

Explanation:

  • <em><u>Fiber to the building</u></em><em><u> </u></em><em>is a type of fiber-optic cable installation where the fiber cable goes to a point on a shared property and the other cabling provides the connection to single homes, offices or other spaces.</em>

<h2><em>hope </em><em>it</em><em> helps</em><em>!</em></h2>
3 0
2 years ago
Many people object to increased cybersecurity because _____.
yawa3891 [41]
Depending on what kind of security measures are implemented, D would definitely be a contender. However, B is also something to take into consideration. I would answer D.<span />
5 0
3 years ago
Read 2 more answers
Please, ignore
Komok [63]
Abhheoorioooooohhhhh omg
3 0
3 years ago
Read 2 more answers
Percentage-wise, which renewable energy source is used most?
Natasha2012 [34]
C)Hydroelectric I believe.
5 0
3 years ago
If an occupation is projected to decline by 7% over the next 10 years, how would you rate the job outlook?
Helen [10]
Steady sounds like the best answer but that’s tough
5 0
3 years ago
Other questions:
  • As you're helping a user configure her e-mail over the phone, she remarks that the IP address is different than it was when she
    6·1 answer
  • The ability to learn a new computer software program is to ____________ as knowledge of state capitals is to _____________.
    11·1 answer
  • What is hyper transport
    10·1 answer
  • Which term means a device that converts one voltage to another?
    13·1 answer
  • Which of the following is not a hazard a driver might encounter?
    5·1 answer
  • Software and technology that allow people to work together on a task are known as
    8·2 answers
  • Select the correct answer.
    7·2 answers
  • Complete the steps for adding a recurring event.
    10·1 answer
  • Temperature converter. This program should prompt the user for two arguments, first a decimal number and second, a single letter
    10·1 answer
  • Suppression of politically or socially unacceptable co
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!