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
lions [1.4K]
2 years ago
12

What will the following code display? int numbers[4] = { 99, 87 }; cout << numbers[3] << endl; a. 87 b.0 d. 34. What

will the following code do? const int SIZE = 5; double x[SIZE]; for(int i = 2; i <= SIZE; i++) { x[i] = 0.0; } garbage This code will not compile a. Each element in the array is initialized to 0.0 b. Each element in the array, except the first, is initialized to 0.0 c. Each element in the array, except the first and the last, is initialized to 0.0 d. An error will occur when the code runs
Computers and Technology
1 answer:
pishuonlain [190]2 years ago
7 0

Answer:

1. The output is 0

2. Each element in the array is initialized to 0.0

Explanation:

Solving (a): The output of the code

We have:

<em>int numbers[4] = { 99, 87 }; </em>

<em>cout << numbers[3] << endl;</em>

<em />

The first line initializes the 0 and 1 index of the array to 99 and 87, respectively.

Other elements will be 0, by default.

So, the following code segment will output 0

<em>cout << numbers[3] << endl; </em>

<em />

Solving (b): What the given code will do?

The first and second line declares an array of 5 elements

However, the following iteration will only initialize the array with 0.0 starting from the second

<em>for(int i = 2; i <= SIZE; i++) { x[i] = 0.0; }</em>

<em />

Because, the counter is initialized to start from the second index.

You might be interested in
Write is an I.P.O cycle? Describe with figure​
lord [1]

Answer:

IPO refers to Input, Output and Process. As the title suggests, the IPO cycle is the input & output after the process of the information. People must give input first to get output, and then the input must be processed to get the desired outcome

7 0
3 years ago
Please Help Me!!!!!!!!!!!!!
My name is Ann [436]

Explanation:

a magazine cause it helps put out commercial

3 0
3 years ago
PLS HELP QUICKLY!!!<br> Thank you
musickatia [10]

Answer:

I think it is the first one

Explanation:

3 0
3 years ago
Read 2 more answers
How would you describe enterprise computing
umka21 [38]

Answer:

It depends on the project that you are doing. If the project is on a computer and it takes effort yes it would be enterprise.

Sorry if I made no sense hopefully I helped you have a great day! :]

6 0
3 years ago
In programming, what is a string?
vovikov84 [41]

Answer:

B.

Explanation:

A. is not the correct answer because that is called a LAN cable (ethernet)

C. is not correct because it has nothing to do with text messages or printing

D. is called a Bus, and isn't the right answer either

3 0
3 years ago
Read 2 more answers
Other questions:
  • What is the opening page of a website called?
    9·2 answers
  • Which of the given original work is protected by the copyright law
    9·1 answer
  • . A program that can run more than one thread at once is called:
    9·1 answer
  • You receive $50 as a birthday gift and choose to spend it all on new wallpaper for your room. The opportunity cost of this decis
    7·1 answer
  • What steps should Jeremy take to get himself motivated to study for the test?
    12·2 answers
  • Two powerboats are about to cross paths. what should the boat on the starboard (right) do?
    11·1 answer
  • dam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took to get the correct
    9·1 answer
  • Hoda is creating a report in Access using the Report Wizard. Which option is not available for adding fields using the wizard?
    15·2 answers
  • C#
    10·1 answer
  • Which browser feature will delete your history, cache, and cookies the moment you close the special window
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!