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
Vadim26 [7]
3 years ago
9

doubleIt is a function that takes one argument and returns no value . The argument is a pointer to int . The function doubles th

e value that the argument points to and stores it back.savings is an int variable that has been declared and initialized .Write a statement that doubles the value stored in savings by invoking the function doubleIt . For example, if the value in savings was 7 before your statement , after your statement its value would be 14.
Computers and Technology
1 answer:
Mama L [17]3 years ago
8 0

Answer:

void doublelt(int *number)

{

*number=*number*2;

}

Explanation:

This exercise is for you to learn and understand the PASS BY POINTER syntax. The importance of this is that if you didnt use a pointer you would have to RETURN an int from the function. in that case the code would be:

int doublelt(int number)

{

number=number*2;

       return number;

}

Passing by pointer manipulates the value by going inside the memory and where it resides. Without the pointer, the function would create COPIES of the argument you pass and delete them once the function ends. And you would have to use the RETURNED value only.

You might be interested in
8.10.8 guess the passcode codehs
harkovskaia [24]

Answer:

sorry its late

Explanation:

/*

* Write a program that guesses every possible 4 digit passcode

* combinations until the correct passcode is guessed.

*

* The passcode is randomly generated and stored in the variable

* secretPasscode.

*

* Print out how many guesses it took to guess the correct passcode.

*/

function start() {

   var correctCode = generateRandomPasscode();

   var b = 0;

   while(true){

       var guessCode = generateRandomPasscode();

       b++;

       if(isCorrect(guessCode, correctCode)){

           println("The correct passcode was " + guessCode);

           println("It took you " + b + " tries to guess it");

       break;

       }

   }

}

function isCorrect(guessCode, correctCode) {

   return guessCode == correctCode;

}

function generateRandomPasscode() {

   var randomPasscode = "";

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

       var randomDigit = Randomizer.nextInt(0, 9);

       randomPasscode += randomDigit;

   }

return randomPasscode;

}

7 0
2 years ago
How does one select an entrepreneurial activity?
dem82 [27]
<span>Entrepreneurial activity is a human action with the goal of the generation of value, through the creation or expansion of economic activity. Several things must be taken into consideration before starting an </span><span>entrepreneurial activity but the most important is :
- the benefits it will give (financial but also personal , will you be satisfied doing that activity and will the activity bring financial benefits to you?
If yes, then you can do this activity.
</span>
6 0
4 years ago
Which is the base class in the following statement? class car : public vehicle
tatiyna

The base class in the following statements is the vehicle class.

<h3>What is a base class?</h3>

A base class is also known as a parent class.

A parent class is the existing class from which the other classes are determined and properties are inherited.

The class car is the child class. The child class inherit the properties of the parent class or the base class.

Therefore, the base class is the vehicle class.

learn more on class here; brainly.com/question/14293976

#SPJ11

8 0
2 years ago
Which is an internet service?<br><br> Antivirus<br> Chat<br> Firewall<br> Router
leva [86]

Answer:

Router

Explanation:

The others are not related to internet per se.

8 0
4 years ago
Read 2 more answers
A security policy is a
777dan777 [17]

Answer:

D: set of rules based on standards and guidelines

Explanation:

3 0
4 years ago
Other questions:
  • Jake is preparing his resume. He is applying for the position of iOS application developer at a large software company. He wants
    6·1 answer
  • I love this an this a a good app ❤️❤️❤️​
    5·2 answers
  • 4) Which is a more efficient way to determine the optimal number of multiplications in a matrix-chain multiplication problem: en
    15·1 answer
  • 1
    13·1 answer
  • Join my disc server "the angels"<br><br> https://dis cord.gg/PYnWArCz<br><br><br> tyyy
    5·1 answer
  • THIS IS FOR MY FINAL PLEASE HELP
    6·1 answer
  • Can you move it like this? I can shake it like that
    6·1 answer
  • What kind of company would hire an Information Support and Service employee?
    8·1 answer
  • When creating an html document, what do we use to set aside space for content?.
    13·1 answer
  • True or false. A plug-in card is always required to support pc sound
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!