Answer:
a. Host A will retransmit neither segments
Explanation:
The options are:
a. Host A will retransmit neither segments
b. Host A will retransmit first segment
c. Host A will retransmit the second segment
d. Host A will retransmit both segments
The first acknowledgment is lost but the second acknowledgment arrives before the timer of the first segment expires, and hence the host A gets confirmation that Host B has received both the segments. And hence Host A will retransmit neither segments.
Answer:
The algorithm is as follows:
1. Input sentence
2. Input character
3. Length = len(sentence)
4. count = 0
5. For i = 0 to Length-1
5.1 If sentence[i] == character
5.1.1 count++
6. Print count
7. Stop
The program in C++ is as follows:
#include <iostream>
#include <string.h>
using namespace std;
int main(){
char str[100]; char chr;
cin.getline(str, 100);
cin>>chr;
int count = 0;
for (int i=0;i<strlen(str);i++){
if (str[i] == chr){
count++;} }
cout << count;
return 0;}
Explanation:
I will provide explanation for the c++ program. The explanation can also be extended to the algorithm
This declares the string and the character
char str[100]; char chr;
This gets input for the string variable
cin.getline(str, 100);
This gets input for the character variable
cin>>chr;
This initializes count to 0
int count = 0;
This iterates through the characters of the string
for (int i=0;i<strlen(str);i++){
If the current character equals the search character, count is incremented by 1
if (str[i] == chr){ count++;} }
This prints the count
cout << count;
Explanation:
Wikis are defined as a form of a website or web page or a database where the users can work on the data, they can even add or edit the data. Wikis use a very quick as well as a easy syntax that allows the users to format the text and create various links between the pages. The users need internet browsers for that.
One of the main advantage of wiki is that it provides ability to collaborate asynchronously, and also without time constraints.Besides it also provides a beneficial function of something. It is free and not expensive.
Explanation:
Talk About The Benefits. of your service over other compines