![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 16.05.2021 16:00 ashliemallen
Counting the character occurrences in a file
For this task you are asked to write a program that will open a file called “story. txt”
and count the number of occurrences of each letter from the alphabet in this file.
At the end your program will output the following report:
Number of occurrences for the alphabets:
a was used – times.
b was used – times.
c was used – times…. …and so, on
Assume the file contains only lower-case letters and for simplicity just a single
paragraph. Your program should keep a counter associated with each letter of the
alphabet (26 counters) [Hint: Use array]
Your program should also print a histogram of characters count by adding
a new function print Histogram (int counters []). This function receives the
counters from the previous task and instead of printing the number of times each
character was used, prints a histogram of the counters.
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 16:50
Consider a slotted aloha system, where the time slot equals the fixed duration of each packet. assume that there are 4 stations a,b,c,d sharing the medium. (a) stations a,b,c,d receive one packet each from higher layers at times 1.3, 1.5, 2.6,5.7 respectively. show which transmissions take place when, according to the slottedaloha protocol; describe all transmissions until all four packets have been successful.when needed, each station has access to the following sequence of random number, provided by a random number generator and drawn uniformly between 0 and 1: (1) station a draws numbers: 0.31, 0.27, 0.78, 0.9, 0.9, 0.11, 0. (2) station b draws numbers: 0.45, 0.28, 0.11, 0.83, 0.37, 0.22, 0. (3)station c draws numbers: 0.1, 0.2, 0.3, 0.4, 0. (4) station d draws numbers: 0.36, 0.77, 0.9, 0.1, 0.1, 0.1, 0.1, 0. (b) in slotted aloha, a station transmits in each time slot with a given probability. what probabilities would you assign to each of the four stations so as to: (i) maximize the efficiency of the protocol? (ii) maximize fairness among the four stations? (c) will the efficiency increase or decrease if we modify slotted aloha as follows: (i) get rid of slots and allow stations to transmit immediately? (ii) implement carrier sensing? (iii) implement collision detection? (iv) implement collision avoidance?
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 08:00
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 12:50
When is it most apprpriate for a development team to change the definition of done
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 14:00
Which computer tools allow you to communicate with coworkers, family,and friends
Answers: 1
You know the right answer?
Counting the character occurrences in a file
For this task you are asked to write a program that wi...
Questions
![question](/tpl/images/cats/mat.png)
Mathematics, 05.02.2021 20:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.02.2021 20:30
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 05.02.2021 20:30
![question](/tpl/images/cats/himiya.png)
Chemistry, 05.02.2021 20:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.02.2021 20:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 05.02.2021 20:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.02.2021 20:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 05.02.2021 20:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.02.2021 20:30
![question](/tpl/images/cats/istoriya.png)
History, 05.02.2021 20:30
![question](/tpl/images/cats/health.png)
Health, 05.02.2021 20:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 05.02.2021 20:30
![question](/tpl/images/cats/mat.png)
Mathematics, 05.02.2021 20:30
![question](/tpl/images/cats/istoriya.png)
History, 05.02.2021 20:30