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
Ber [7]
3 years ago
10

Write a value-returning function that receives an array of integer values and the array size as parameters and returns a count o

f the number of elements that are less than 60.
Computers and Technology
1 answer:
Mrac [35]3 years ago
7 0

Answer:

The c++ function for reversing an array is given. The function is declared void since it returns no value.

void reverse( int arr[], int len )

{

  int temp[len];

  for( int k = 0; k < len; k++ )

  {

      temp[k] = arr[k];

  }

  for( int k = 0, j = len-1; k < len, j>= 0; k++, j-- )

  {

          arr[k] = temp[j];

   }

}

Explanation:

The reverse function uses another array to reverse the elements of the original array.

An integer array is declared, temp[len], having the same length as the input array.

int temp[len];

To begin with, the elements of the input array are copied in the temp array.

for(int k = 0; k < len; k++ )

{

      temp[k] = arr[k];

}

Next, the elements of the input array are given new value.

The temp array, in reverse order, is copied into the input array.

for( int k = 0, j = len-1; k < len, j>= 0; k++, j-- )

{

          arr[k] = temp[j];

}

The above for loop makes use of two variables simultaneously.

While the array, arr is proceeding from first element to the next, the array temp begins with the last element and goes down to the previous element.

Now, the input array, arr, contains the elements in reverse order.

The complete program is given.

#include <iostream>

using namespace std;  

void reverse( int arr[], int len );

void reverse( int arr[], int len )

{

  int temp[len];

 

  for(int k = 0; k < len; k++ )

  {

      temp[k] = arr[k];

  }

 

  for( int k = 0, j = len-1; k < len, j>= 0; k++, j-- )

  {

          arr[k] = temp[j];

  }

 

}

int main()  

{

  int len = 5;    

  int arri[len];    

  for( int l = 0; l < len; l++ )

  {

      arri[l] = l;

  }

 

  reverse( arri, len );    

  return 0;

}

You might be interested in
Sorts by value in reverse order; keeps the same key
KATRIN_1 [288]

Answer:

rsort()

Explanation:

the sorting function is used to sort the elements in the array.

the sorting can be increasing or decreasing, depends on the function used.

let discuss the option:

a. sort()

this is the sorting function, it used to sort the array in ascending order.

b. arsort()

this is also sorting function, it used to sort the associated array in descending order according to the value.

d. asort()

this is also sorting function, it used to sort the associated array in ascending order according to the value.

c. rsort()

this is the sorting function, it used to sort the array in descending order.

Therefore, the correct answer is rsort().

4 0
3 years ago
Use the provided MS-Excel template to note entries for each .pcap file in Wireshark that are of interest, as well as your assess
zhenek [66]

Answer:You should note entries for each PCAP file in Wireshark that are of interest as from ENCM 369 at ... file in Wireshark that are of interest, as well as your assessment of potential vulnerabilities. Such vulnerabilities might be due to plaintext data exchange between two machines, which might be exploitable by session hijacking, ...

Explanation:

4 0
3 years ago
(TCO G) _____ is when network managers deal with network breakdowns and immediate problems instead of performing tasks according
NeTakaya

Option D

Firefighting is when network managers deal with network breakdowns and immediate problems instead of performing tasks according to a well laid out plan.

<h3><u>Explanation:</u></h3>

Network management is a process of monitoring, operating and controlling the network. Various network managers spend most of their time firefighting- dealing with breakdowns and urgent problems.

If managers do not allocate enough time planning and organizing the network and networking staff, they are intended to be reactive rather than proactive in solving problems. A term that refers to reacting to network problems as they arise rather than relying on planned network management activity

4 0
3 years ago
Dim Inventory() as Integer = {357, 126, 220}Call Stock(Inventory(2),Me.lblOutput)Sub Stock (ByVal Number As Integer, ByRef lblLa
aalyn [17]

Answer:

The answer is "Option c".

Explanation:

In the given visual basic code, an integer array "Inventory" is declared, that includes 3 elements, that are "357, 126, and 220". In the next line, a call stock function is used, in the function, the array is passed as a parameter and in array parameter, the index value that is "2" is passed. This function use label to print array index value, that is "220". and other options are incorrect that can be described as follows:

  • Option a and Option b both are wrong because array indexing always starts with 0 and ends with n-1, and in this array, it will take index value 2, which is not equal to 357 and 126.

6 0
3 years ago
Match each task with the features necessary to complete the task.
Gnesinka [82]

Answer:

Hopefully this help you. Sound like you are using Microsoft Excel

Explanation:

4 0
2 years ago
Other questions:
  • Need Help ASAP!
    14·2 answers
  • What was the name of the first computer (machine) language?
    5·2 answers
  • The term median means
    9·2 answers
  • You are trying to access the Wi-Fi network at a coffee shop. What protocol will this type of wireless networking most likely use
    11·1 answer
  • Write a class called Line that represents a line segment between two Points. Your Line objects should have the following methods
    8·1 answer
  • What does a computer do with what it receives from the interpreter?
    14·1 answer
  • _____ is a method of computing that delivers secure, private, and reliable computing experiences based on sound business practic
    7·1 answer
  • If you could pick xbox or playstation what would you pick?And why :)?
    11·2 answers
  • Is the following statement valid or invalid? y + 1 = 6​
    8·1 answer
  • What is the most likely reason a company would use enterprise software?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!