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
Minchanka [31]
2 years ago
14

Write down the functions of network layer in your own words.ASAP

Computers and Technology
1 answer:
sergeinik [125]2 years ago
8 0
Hrhnebevevebnenebebenene
You might be interested in
Which bug type would you suggest for the following bug? The button label "Add to cart" is not fully visible.
harina [27]
Butterfly one I forgot the name metapods evolution
3 0
3 years ago
Create a structure representing a student. The member variables should include student name, student ID, and four test grades fo
Neporo4naja [7]

Answer:

Output:

Name: Brainly

ID:0001

Write the 4 tests grades of the student separated by space :10 9 8 10

Brainly

0001

10 9 8 10

Average :9.66667

'1' to continue '0' to exit :

Explanation:

#include<iostream>

#include<string>

using namespace std;

//variables declaration

struct Student {

  string id; //string declaration ID

  string name; // string declaration name

  int grades[4]; //array of 4 because it is 4 grades

};

//definition of the function get information

void inputData(Student &s){

 

   

   cout << "Name:" ;

   getline(cin,s.name);

   cout << "ID:";

   cin >> s.id;

   cout << "Write the 4 tests grades of the student separated by space :";

   for (int i = 0; i<4; i++)

       cin >> s.grades[i];

}

//definition of the function of average

double inputAvg(Student s){

   double summation;

   int temporary;

   double average;

   for (int i = 0; i<4; i++){  

      for (int j = i; j<4; j++){

         if (s.grades[j] > s.grades[i]){

             temporary = s.grades[i];

             s.grades[i] = s.grades[j];

             s.grades[j] = temporary;

         }

      }

    }

    summation = 0;

    for (int i = 0; i<3; i++){

        summation = summation + s.grades[i];  

    }

    average = summation/3;

    return average;

}

void disp(Student *s){

   cout << s->name << endl;

   cout << s->id << endl;

   for (int i = 0; i<4; i++)

       cout << s->grades[i] << " ";

   cout << endl;

   cout << "Average :" << inputAvg(*s) << endl;

   

}

int main(){

  Student st;

  int ch;

  while(true){

      inputData(st);

      disp(&st);

      cout << " '1' to continue '0' to exit :";

      cin >> ch;

      if (ch == 0)

         break;      

  }

  return 0;

}

6 0
2 years ago
Write a function transpose(matrix) that returns the transpose of the input matrix, which is represented as a list of lists. Reca
mariarad [96]

Answer:you eat

Explanation:yea

4 0
2 years ago
Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)int[] a = {1, 3, 7, 0, 0,
boyakko [2]

Answer:

Option 1: May crash at runtime because it can input more elements than the array can hold

Explanation:

Given the code as follows:

  1.        int[] a = {1, 3, 7, 0, 0, 0};
  2.        int size = 3, capacity = 6;
  3.        int value = cin.nextInt();
  4.        while (value > 0)
  5.        {
  6.            a[size] = value;
  7.            size++;
  8.            value = cin.nextInt();
  9.        }

From the code above, we know the <em>a</em> is an array with six elements (Line 1). Since the array has been initialized with six elements, the capacity of the array cannot be altered in later stage.

However, a while loop is created to keep prompting for user input an integer and overwrite the value in the array started from index 3 (Line 4- 9). In every round of loop, the index is incremented by 1 (Line 7). If the user input for variable <em>value</em> is always above zero, the while loop will persist.  This may reach a point where the index value is out of bound and crash the program. Please note the maximum index value for the array is supposedly be 5.  

8 0
3 years ago
Which of the following would a cyber criminal most likely do once they gained access to a user id and password
Bogdan [553]

Answer:

do something wrong as you

3 0
2 years ago
Other questions:
  • Speech on inventors and inventions
    14·1 answer
  • You are a project manager tasked to implement a critical application in a reputed bank. A client review indicates that you could
    11·2 answers
  • Smoking is a REALLY good example of a choice that can have negative effects on the smoker's health, AND the well-being of others
    9·1 answer
  • Which of the following software maintenance steps erases gaps caused by deleting files from the hard drive?
    10·1 answer
  • Select the correct answer.
    13·1 answer
  • Baking Cookies. Sweet Dough Inc. bakes cookies—a popular dessert—based on the quantities ordered by their customers. Three raw m
    12·1 answer
  • The __________ tag is used to create a forced line break without starting a new paragraph.
    13·1 answer
  • What is the name of the virus that appears to be a legitimate program but when opened
    9·1 answer
  • Define Indentation
    8·1 answer
  • What can be the maximum possible length of an identifier 3163 79 can be of any length​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!