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]
3 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]3 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
A bulb has a resistance of 15Ω and is rated at 3A. What is the maximum voltage that can be applied across the bulb?
Anastasy [175]

Answer:Wheres the option choice??????????????????????

Explanation:

7 0
2 years ago
How drone technology can impact recreation and entertainment​
Maurinko [17]

Drones are become more advanced than ever before. Are now, they are starting to impact recreation. They are small, light, and can maneuver incredibly fast. They are being used in movies, skits, short films, and even high-end videos. Here are some ways drones are changing entertainment:

- Providing high-quality filming, even from 200 feet in the air.

- Reaching spaces where bulky helicopters cannot fit into safely

- Laser shows, where drones shine lights and lasers.

Right now, if you tried to hold your phone still to capture a video, you would not be able to do it. Upon checking the footage, you would see the camera shaking, even if it's just tiny bit. While you can lean it on a surface to fix this, it simply cannot be done in the air to capture. Not to worry, though, you've got drones. They can shoot a steady shot 200 feet in the air. The only thing that could rival drones are expensive, bulky choppers. The drones are cheaper and are mass produced.

However, drones are not only being used to filming movies and films. They are also being used for a different kind of entertainment: Shows. Drones move in formation and shine lights in the night sky, like we saw in the Winter Olympics. They are truly stunning(pics attached).

7 0
2 years ago
What type of dns servers field dns queries, send iterative queries to upstream dns servers, or send requests to forwarders and t
photoshop1234 [79]

Answer:

catching only server to send iterative queries to upstream DNS servers, or send requests to forwarders

<h3>what DNS server normally sends iterative questions with another DNS server?</h3>
  • The DNS server sends an iterative query to a root server.
  • The root server responds with a referral to the top-level domain server address. a. Client's DNS server, with the top-level domain server address, generates a new iterative query and sends it to the top-level domain server.

To learn more about DNS servers, refer

to brainly.com/question/2051280

#SPJ4

6 0
2 years ago
What is the capital for Russia
s344n2d4d5 [400]

Answer:

Moscow

Explanation:

Moscow is the capital of Russia and was made the capital in 1918.

4 0
3 years ago
Read 2 more answers
What are the different types of interaction in nature ?????????​
densk [106]

mutualism, commensalism, competition and predation

7 0
3 years ago
Other questions:
  • Think about a time when someone made a biased judgment about you or acted unfairly toward you because of your age, skin color, c
    6·1 answer
  • The ____________________ packet-filtering firewall allows only a particular packet with a particular source, destination, and po
    10·1 answer
  • A third-grade teacher at Potter Elementary School wants a program that allows a student to enter the amount of money a customer
    14·1 answer
  • Identify and discuss the seven layers of the Open System Interconnection (OSI) model and their importance on TCP/IP operation.
    7·1 answer
  • How do you change the order of the slides in your presentation in the slide pane 
    15·2 answers
  • A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed
    15·1 answer
  • Modify the Comments.java program from Programming Exercise 1-10 so at least one of the statements about comments is displayed in
    10·1 answer
  • Caps lock key is used to type alphabets. _________​
    6·2 answers
  • The email_list function receives a dictionary, which contains domain names as keys, and a list of users as values. Fill in the b
    14·1 answer
  • What is the full form of RPM in computer ​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!