answer.
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
katovenus [111]
2 years ago
5

____________________ parameters are useful in three situations: • When the value of the actual parameter needs to be changed • W

hen you want to return more than one value from a function • When passing the address would save memory space and time relative to copying a large amount of data
Computers and Technology
1 answer:
jenyasd209 [6]2 years ago
8 0

Answer:

The correct word for the blank space is: Reference.

Explanation:

In C++, Reference Parameter is a type of parameter that does not need additional storage since it represents an already existing function.  The function has the characteristic of passing more than one (1) variable. Reference parameters are also used to edit the existing parameter or when referencing a function saves storage compared to creating a new function.

You might be interested in
Locker doors There are n lockers in a hallway, numbered sequentially from 1 to n. Initially, all the locker doors are closed. Yo
kow [346]

Answer:

// here is code in C++

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables

   int n,no_open=0;

   cout<<"enter the number of lockers:";

   // read the number of lockers

   cin>>n;

   // initialize all lockers with 0, 0 for locked and 1 for open

   int lock[n]={};

   // toggle the locks

   // in each pass toggle every ith lock

   // if open close it and vice versa

   for(int i=1;i<=n;i++)

   {

       for(int a=0;a<n;a++)

       {

           if((a+1)%i==0)

           {

               if(lock[a]==0)

               lock[a]=1;

               else if(lock[a]==1)

               lock[a]=0;

           }

       }

   }

   cout<<"After last pass status of all locks:"<<endl;

   // print the status of all locks

   for(int x=0;x<n;x++)

   {

       if(lock[x]==0)

       {

           cout<<"lock "<<x+1<<" is close."<<endl;

       }

       else if(lock[x]==1)

       {

           cout<<"lock "<<x+1<<" is open."<<endl;

           // count the open locks

           no_open++;

       }

   }

   // print the open locks

   cout<<"total open locks are :"<<no_open<<endl;

return 0;

}

Explanation:

First read the number of lockers from user.Create an array of size n, and make all the locks closed.Then run a for loop to toggle locks.In pass i, toggle every ith lock.If lock is open then close it and vice versa.After the last pass print the status of each lock and print count of open locks.

Output:

enter the number of lockers:9

After last pass status of all locks:

lock 1 is open.

lock 2 is close.

lock 3 is close.

lock 4 is open.

lock 5 is close.

lock 6 is close.

lock 7 is close.

lock 8 is close.

lock 9 is open.

total open locks are :3

5 0
2 years ago
Which of the following should be filed immediately after Wakefield, Donald?
Eva8 [605]
This is the order in which it should be filed.

Wakefield, Cyndi
Wakefield, Donald  
Wakefield, Drew  ⇒ this is the answer. Since both have Ds, we evaluate O and                                     R. O comes first before R.
Wakefield, Edgar
Wheton, John
8 0
2 years ago
Convert Newton’s method for approximating square roots in Project 1 to a recursive function named newton. (Hint: The estimate of
PIT_PIT [208]

Answer:

import math

tolerance=0.00001

approximation=1.0

x = float(input("Enter a positive number: "))

def newton(number,approximation):

   approximation=(approximation+number/approximation)/2

   difference_value =abs(number-approximation**2)

   if difference_value<= tolerance:

       return approximation

   else:

       return newton(number,approximation)

print("The approximation of program = ", newton(x, approximation))

print("The approximation of Python = ", math.sqrt(x))

Explanation:    

  • Create a recursive function called newton that calls itself again and again to approximate square root for the newton technique.
  • Apply the formulas to find the estimate value  and the difference value .
  • Check whether the difference_value is less than the tolerance value  and then return the value of approximation  else make a recursive call to the newton function by passing the  user input and the new approximation value .
  • Finally display all the results using the print statement.
3 0
2 years ago
System software includes all of the following except
Amanda [17]

Answer:

System software includes all of the following except <u>Browsers</u>.

Explanation:

I just know

4 0
2 years ago
Assume that s is a string . write an expression whose value is true if and only if the value of s would come between "mortgage"
fomenos
S > "mortgage" && s < "mortuary"
4 0
2 years ago
Other questions:
  • In three to four sentences, describe why CEOs (the chief executive officers, that is, the leaders of large companies) make very
    9·1 answer
  • Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
    9·2 answers
  • An online game is played with two dice. In this context, explain what is meant by decomposition in a simple way.
    15·1 answer
  • Use a VLOOKUP function in cell I5 to identify and calculate the federal withholding tax. Use the tax rates from the range D21:E2
    15·1 answer
  • A ____ resembles a circle of computers that communicate with each other.
    14·1 answer
  • Which advertising medium has the widest reach on a global front?
    12·1 answer
  • Which of the following provides a suite of integrated software modules for finance and accounting, human resources, manufacturin
    15·1 answer
  • Which one of the following is a correct declaration for a method named passAList that has as arguments an array list myList of s
    8·1 answer
  • A program is divided into 3 blocks that are being compiled on 3 parallel computers. Each block takes an Exponential amount of ti
    6·1 answer
  • (Java) Which of the following code segments correctly declare a Strings and gives it a value of "fortran".
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!