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
Which of the following best describes cost-benefit analysis?
d1i1m1o1n [39]

Answer:

A

Explanation:

7 0
3 years ago
Proszę daje wszystko potrzebuje tego
Stolb23 [73]
I’m sorry I do not speak that
5 0
3 years ago
Read 2 more answers
Hypertension occurs when blood pressure is too high.
Ivan
True, hypertension is when your blood pressure is to high.
Please mark as brainliest
8 0
3 years ago
What is the correct sequence of the phases in the systems development life cycle?
HACTEHA [7]
1. Requirements gathering/analysis.
2. Design.
3. Development.
4. Testing.
5. Maintenance.
7 0
4 years ago
Megan was employed by a large company. Her supervisor told her to falsify government reports. She refused and was fired. She sue
Ber [7]

Answer: Option(d) is correct option

Explanation:

At-will employment is the employment in contractual manner in which employer can fire employee without any warning or indication .They can fire employee for any cause .

  • According to the question, even though Megan was hired at at-will employment base ,she does not persist much right over the company but she should not be dismissed for not performing illegal act as the reason for getting fired.This is a unfair and illegal manner of firing.
  • Other options are incorrect because employer was not correct on firing her because of loyalty duty or based on legal right or with just reason.Thus, the correct option is option(d)
7 0
3 years ago
Other questions:
  • Fifty-three percent of U.S households have a personal computer. In a random sample of 250 households, what is the probability th
    11·1 answer
  • What component on a smartphone requires pairing with another device?
    8·1 answer
  • A form of Internet identity theft involving phony e-mail messages asking customers to update their credit card numbers, account
    7·1 answer
  • The concept of ____ refers to the idea that the internet is designed for all content to be treated equally.
    12·1 answer
  • Write a short java method that takes an integer n and returns the sum of all the odd positive integers less than or equal to n.
    5·1 answer
  • What is a set of javascript statements that result in an action?
    15·1 answer
  • Assume that the classes listed in the Java Quick Reference have been imported where appropriate.
    8·2 answers
  • Refer to the exhibit. The PC is connected to the console port of the switch. All the other connections are made through FastEthe
    6·1 answer
  • Define the following term. data, database, DBMS, database system, data- base catalog, program-data independence, user wen', DBA,
    12·1 answer
  • What is the shortcut to select all text?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!