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
liq [111]
3 years ago
14

For the bag class in Chapter 3 (using a fixed array and a typedef statement) what steps were necessary for changing from a bag o

f integers to a bag of double values?
A. Change the array declaration from int data[CAPACITY] to double data [CAPACITY and recompile.
B. Change the int to double in the typedef statement and recompile
C. Round each double value to an integer before putting it in the bag.
D. Round each double value to an integer after taking it out of the bag.
Computers and Technology
1 answer:
stiks02 [169]3 years ago
8 0

Answer:

B. Change the int to double in the typedef statement and recompile

Explanation:

A typedef declaration is used to assign names to database.

Syntax:

typedef data_type new_name;

For this case the initial deceleration was

typedef int bag;

To change it to double values we have to do following

typedef double bag;

Therefore, option B is correct change the int to double in the typedef statement and recompile.

You might be interested in
EEEEEEEEEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIII
OLEGan [10]

Explanation:

hagshshshshshshshvcvgafffffrfggggggggggggcbbbbbbbbbbbbbbccccccccccccbhhhhhhhhh

6 0
3 years ago
Read 2 more answers
Where could cloud computing fit in the organizational structure and operations?
vampirchik [111]

Answer:

Computing cloud could fit in the website under the IT directory, with total access to all employees and shareholders.

Explanation:

8 0
3 years ago
What is the most common form of renewable energy used to generate electricity
sertanlavr [38]

i think that it’s either sunlight or solar energy

6 0
3 years ago
3. Why did Steve Jobs and Steve Wozniak start working on developing computers?
LenaWriter [7]
Jobs was less hands-on when it came to developing computer software, and instead focused on design, advertising and talking to press, Wozniak said. “One thing he wanted was to somehow be important in the world, though he didn't have the academic or business, background, he had me,” he said.
4 0
4 years ago
Be your self today!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Georgia [21]

Answer:

So, Do my work quickly get an A+ and play ro blox for the rest of the day?

5 0
3 years ago
Other questions:
  • Write a loop to print 10 to 90 inclusive (this means it should include both the 10 and 90), 10 per line.​
    6·1 answer
  • . _______ are the components that allow a posi-traction differential to transfer power from one drive wheel to another.
    10·1 answer
  • Consider this program segment: int newNum = 0, temp; int num = k; // k is some predefined integer value 0 while (num > 10) {
    9·1 answer
  • A vertical curve means that any change in the Aggregate Price Level will have what result?
    15·1 answer
  • WHAT DOES THE WORD MONOCHROME MEAN?
    11·1 answer
  • Write a method named circleArea that accepts the radius of a circle as a parameter (as a real number) and returns the area of a
    12·1 answer
  • Which of these devices is usually the default for most home network?
    12·1 answer
  • HELP ASAP!!!
    7·1 answer
  • Create union floatingPoint with members float f, double d and long double x. Write a program that inputs values of type float, d
    7·1 answer
  • Why does Homework exist? Why is it so important?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!