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
which of the following formatting tools would i use if i really wanted a word to stand out in my document​
sweet-ann [11.9K]
You should change the font of that specific word to another colour. And you can also make it bold and italic. Furthermore, you may even italicize it and make the font larger.

Hope it helps :)
6 0
3 years ago
Create a trigger that prevents anychange(insert, update, or delete)to the grade attribute of the takesrelation that would change
Dmitriy789 [7]
Omg co ol like chicken is funny sometimes
6 0
3 years ago
A stock trading company had the budget for enhancing its secondary datacenter approved. Since the main site is a hurricane-affec
Katyanochek1 [597]

Answer: a) Hot site

Explanation: Hot site is the location that is present in the off-site in which the organization can continue the business process during any disaster. This site provides the organization with all the required equipment and elements to carry on the work at regular basis such as data backups, computer system, communication devices etc.

Other options are incorrect because warm site is used for recovering the business process while major data center goes out of service, cold site takes long time to recover the functioning of the business from off-premises and cloud based site is the site where resources and services are provided to consumer through internet facility.

4 0
3 years ago
The simple mixture of flour and water​
kykrilka [37]

Answer:

Batter is a simple mixture of flour and water is used to make crepes and pancakes. It is also used to coat fruit for fritters.

8 0
1 year ago
Read 2 more answers
Calling all engineers and tech geniuses. Brianliest for correct answer.
vodomira [7]

Answer:

so id assume you need a battery like in the photo. to attach it you should be able to look at the top of the battery and just click the battery component onto the battery. sorry if im using the incorrect terms.

5 0
3 years ago
Other questions:
  • What technology process would help you access files at all times?
    11·1 answer
  • A virus has attacked your hard drive and now when you start up Windows, instead of seeing a Windows desktop, the system freezes
    9·2 answers
  • Which one of the following is true about employer responsibility in providing fall protection to workers? not selected A. Employ
    15·2 answers
  • Write code that inserts userItem into the output string stream itemsOSS until the user enters "Exit". Each item should be follow
    5·1 answer
  • Together with some anthropologists, you’re studying a sparsely populated region of a rainforest, where 50 farmers live along a 5
    15·1 answer
  • what will be the Trade discount and Invoice Amount if the List Price is $400.00 and the Trade Discount Rate is 85%
    14·1 answer
  • . Consider the problem of finding the largest element in a list of n elements. What will be the basic operation of an algorithm
    9·1 answer
  • . What is piracy? ???????????????????​
    5·1 answer
  • Usually it is a rectangular box placeed or underneath your desk​
    15·1 answer
  • Tabs are usually set ________ to the right of the left margin.
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!