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
DochEvi [55]
3 years ago
12

When you pass a double variable to a method, the method receives ______.a) a copy of the memory addressb) the reference of the v

ariablec) the length of the variabled) a copy of the variablee) the binary memory address
Computers and Technology
1 answer:
Nesterboy [21]3 years ago
4 0

Answer:

The answer is "Option d".

Explanation:

In this question the choice d, that is "a copy of the variable" is correct because the method takes a reference value or a copy of the variable in its parameter, the example of this question can be defined as follows:

void me2(double x)//defining a method me2 with a double parameter

{

//method body

 }

double x = 35.655;//defining a double variable x

me2(x);//calling a method with passing the copy of th e variable

You might be interested in
In what ways was the first Mac OS different from the operating systems used by most early PCs? Users clicked on pictures to laun
777dan777 [17]

Users didn't have to memorize lots of commands.

3 0
3 years ago
Write a pseudocode thats accept and then find out whether the number is divisible by 5 ​
meriva

Answer:

input number  

calculate modulus of the number and 5  

compare outcome to 0  

if 0 then output "divisible by 5"  

else output "not divisible by 5"

Explanation:

The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.

3 0
4 years ago
6. What is saddle-stitch binding?
kifflom [539]
Commonly known as book stapling, ‘saddle stitched’ is one of the most popular binding methods. The technique uses printed sheets which are folded and nestled inside each other. These pages are then stapled together through the fold line. Saddle stitched binding can be applied to all book dimensions and both portrait and landscape orientation.
5 0
3 years ago
Read 2 more answers
Requests to retrieve data written in a language such as SQL are called…
Oksanka [162]
B. Queries

Queries can be fairly broad or written to focus on time frames, types of data, ranges etc.
5 0
3 years ago
Create a simple main() that solves the subset sum problem for any vector ofints. Here is an example of the set-up and output. Yo
ivolga24 [154]

Answer:

The main function is given below. Appropriate comments are made where necessary. In addition to this, I added a full code for the problem to help you understand it fully

Explanation:

// Sublist.cpp : Defines the entry point for the console application.

//

#include "stdafx.h"

#include <iostream>

#include <vector>

using namespace std;

int sumInStack = 0;

int TARGET_SUM = 180;

vector<int> choices;

void subList(vector<int> data, int fromIndex, int endIndex);

void print();

int main()

{  

  vector<int> dataSet;

  int k, j, fromIndex,endIndex;

  bool foundPerfect;

  dataSet.push_back(20); dataSet.push_back(12);     dataSet.push_back(22);

  dataSet.push_back(15); dataSet.push_back(25);

  dataSet.push_back(19); dataSet.push_back(29);

  dataSet.push_back(18);

  dataSet.push_back(11); dataSet.push_back(13); dataSet.push_back(17);

  choices.clear();

  fromIndex=0;

  endIndex=dataSet.size();

  cout << "Target time: " << TARGET_SUM << endl;

  subList(dataSet, fromIndex, endIndex);

  // code provided by student

  system("pause");

  return 0;

}

void subList(vector<int> data, int fromIndex, int endIndex) {

       /*

       * Check if sum of elements stored in Stack is equal to the expected

       * target sum.

       *

       * If so, call print method to print the candidate satisfied result.

       */

       if (sumInStack == TARGET_SUM)

         {

          print();

       }

       for (int currentIndex = fromIndex; currentIndex < endIndex; currentIndex++)

         {

           if (sumInStack + data[currentIndex] <= TARGET_SUM)

             {

                  choices.push_back(data[currentIndex]);

               sumInStack += data[currentIndex];

               /*

               * Make the currentIndex +1, and then use recursion to proceed

               * further.

               */

           subList(data, currentIndex + 1, endIndex);

                  sumInStack -= choices.back();

                  choices.pop_back();

           }

       }

   }

void print()

{

    cout<<TARGET_SUM<<" = ";

    for(int i=0;i<choices.size();i++)

    {

         cout<<choices.at(i)<<"+";

    }

}

8 0
4 years ago
Other questions:
  • Using commands you learned in lessons 1 and 2. Get your IP address, netmask, DNS hostname, and MAC address. Compare these with y
    5·1 answer
  • Who has access to the source code of proprietary software?
    15·2 answers
  • Which of the following is NOT a type of technology user? Digital Collaborator Media Mover Desktop Veteran Drifting Surfer Inform
    6·1 answer
  • How to do this PLEASE HELP 80 points!
    15·1 answer
  • Without any formal planning, the president of a software company remarks in a speech that new technologically advanced software
    12·1 answer
  • Which programming element is used by a game program to track and display score information?
    10·2 answers
  • What accesses organizational databases that track similar issues or questions and automatically generate the details to the repr
    14·1 answer
  • (Java)
    11·2 answers
  • Explain the limitations of the old economy<br>​
    15·1 answer
  • A common business practice is to include a worksheet named Documentation that contains a description of the workbook, the name o
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!