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 do we call the input and output devices that are connected externally to the computer?
Anna35 [415]

Explanation:

computer peripheral is an external device that provides input and output for the computer. for example keyboard and mouse are input peripherals while mouse and printer are output peripherals...

5 0
3 years ago
Read 2 more answers
Combustion is an example of to energy conversion.
Marizza181 [45]
If this is a true or false question I would say true... but I dont know I’m confusion <3
7 0
3 years ago
[80 points] Fill in the missing word.
AVprozaik [17]

Answer:

except

you can use github copilot for this  question

8 0
2 years ago
U GET BRAINLIEST HELP PLZ
Art [367]
BOTH OF THEM ARE C : )
3 0
3 years ago
Digital cameras are less susceptible to UV light true or false
Nesterboy [21]
Yes because the UV light is brighter
3 0
3 years ago
Read 2 more answers
Other questions:
  • Assign a pointer to any instance of searchChar in personName to searchResult.#include #include using namespace std;int main() {c
    5·1 answer
  • Some might consider careers in the Construction industry to be quite flexible. Which statement supports this claim? Employees ca
    14·2 answers
  • In Word, tables can be styled much like text can.<br> True<br> False
    6·1 answer
  • Technologies that allow for instant worldwide communication include satellite and computer systems. mobile phones and internet a
    8·2 answers
  • python Write a program that will take a file named Celsius.dat that contains a list of temperatures in Celsius (one per line), a
    9·1 answer
  • Practice with CSS. a. Write the CSS for an HTML selector footer with the following characteristics: a light-blue background colo
    11·1 answer
  • What is text box and label control​
    10·2 answers
  • Suppose L is a LIST and p, q, and r are positions. As a function of n, the length of list L, determine how many times the functi
    8·1 answer
  • What do you do when ur grounded from all electronics and can't go outside and have t clean all day
    10·1 answer
  • 1) What is y after executing the statements?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!