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
You use the _____ sheet in the format cells dialog box to position data in a cell by centering it, for example.​
Oliga [24]
You use the Alignment sheet in the format cells dialog box to position data in a cell by centering it, for example. Generally along the middle branch is a line or centerline of the definite pipeline on a scale of whatever is indicated.
3 0
3 years ago
Give one (1) advantage and one(1) disadvantage of using and integrated software package over a custom written one.
Harrizon [31]

Answer:

See explanation

Explanation:

An Integrated software package is a kind of software package that combines various applications in just one program. It basically provides one spreadsheet, one word processing and database management. A good example is the Microsoft Office.

A custom written software package on the other hand is the type that is specially created for a particular business. It is created to meet the client's specifications and preferences.

An advantage of using integrated software is the low cost and fast deployment. Integrated software packages are relatively affordable and easy to acquire unlike that custom based ones that take time to create.

A disadvantage of the integrated software is the lack of control and flexibility. Because it is an integrated software package, you have no control over how it is built and on the long run their updates may not be what you want. And unlike the Custom written one, you cannot tell the developers to add or remove features that suit your needs.

7 0
3 years ago
How can random numbers in a range be generated in Java?.
Ksju [112]

Answer:

Java oh Na Na my  

Explanation:

5 0
2 years ago
Write a lottery program that will ask the user if they would like to pick 5 numbers (1-30) or if they would like to choose EZ Pi
Llana [10]

Answer:

Explanation:

The following code is written in Python and creates arrays for the user's numbers and the next chance numbers, it also creates a cost variable and a did_you_win variable. The function takes in the winning numbers as an array parameter. It asks all the necessary questions to generate data for all the variables and then compares the user's numbers to the winning numbers in order to detect if the user has won. Finally, it prints all the necessary information.

import random

def lottery(winning_numbers):

   user_numbers = []

   next_chance_drawing = []

   cost = 0

   did_you_win = "No"

   #print("Would you like to choose your own 5 numbers? Y or N")

   answer = input("Would you like to choose your own 5 numbers? Y or N: ")

   if answer.capitalize() == "Y":

       for x in range(5):

           user_numbers.append(input("Enter number " + str(x+1) + ": "))

   else:

       for x in range(5):

           user_numbers.append(random.randint(0,31))

           cost += 1

   next_chance = input("Would you like to enter a Next Chance drawing for $1.00? Y or N: ")

   if next_chance.capitalize() == "Y":

       for x in range(4):

           next_chance_drawing.append(random.randint(0, 31))

           cost += 1

           

   if user_numbers == winning_numbers or next_chance_drawing == winning_numbers:

       did_you_win = "Yes"

   print("User Numbers: " + str(user_numbers))

   print("Next Chance Numbers: " + str(next_chance_drawing))

   print("Cost: $" + str(cost))

   print("Did you win: " + did_you_win)

6 0
2 years ago
Question 4 Multiple Choice Worth 5 points)
Morgarella [4.7K]

The correct answer is Boolean logic.

Booleans are true or false statements.

An example of a while loop is:

while 1 < 5:

   #do something.

The Boolean statement is 1 < 5 which evaluates to true because 1 is less than 5.

I hope this helps!

3 0
3 years ago
Other questions:
  • Prompt the user for a string that contains two strings separated by a comma. (1 pt)Examples of strings that can be accepted:Jill
    5·1 answer
  • In your memo, give three new employees directions for starting the computer and opening a word-processing document.
    9·1 answer
  • How do you do this question
    11·1 answer
  • When is 1600 plus 25 and 1700 minus 35 the same thing?​
    10·1 answer
  • Functionality testing is primarily used with ____________. firewall protection software development hardening servers server tes
    8·1 answer
  • _________ can be used to provide access control, confidentiality, data origin authentication, connectionless integrity, rejectio
    12·1 answer
  • A friend of mine had a samsung j2 phone and someone with a iphone placed something in her phone she thought was malware in her p
    7·1 answer
  • What feature preserves your open apps and data, but allows another user to log in to his or her own session of the same computer
    7·1 answer
  • What is the "Driver's Compact Law"?
    8·2 answers
  • True of false that the memory of laptop is normally measured in kilobytes
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!