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
DES: Group of answer choices A) is a commonly used symmetric encryption B) algorithm that was developed in the mid-C) 1970s was
OLEGan [10]

DES is a commonly used symmetric encryption

A) is a commonly used symmetric encryption

<u>Explanation:</u>

DES stands for Data Encryption Standard. It is a symmetric key algorithm and is used for encrypting electronic data. It was developed in 1975. DES is one of the oldest encryption standards to be used in the industry.

The algorithm takes 16 rounds of permutations in order to encrypt data. But now, with the advent of technology, as new algorithms have been designed and put in use, DES is less preferable.

In the process of key generation, some keys generated sometimes turn out to be weak and hence are prone to attacks. If not for the weak keys generation, DES works perfectly fine and is an effective algorithm to encrypt data.

6 0
3 years ago
Detecta 1 problema
Komok [63]

Answer:

En el factor secundario el problema es la contaminación ambiental y (o) polución.

Explanation:

No solo dentro de las industrias, si no que en todos lados...

Una manera de contrarrestar este problema es reducir el uso de recursos no renovables y utilizar los renovables. En forma de ahorro, los no renovables se podran producir un poco mas y podriamos mantener un buen ciclo de uso.

Espero te sirva!!

3 0
3 years ago
Read 2 more answers
How do i unblock a website on a school computer if a school blocks it?
tresset_1 [31]

Answer:

look up ultrasurf and just follow the thingy and it will download a vpn ive had it on my computer for a fat min

Explanation:

4 0
2 years ago
Which type of workplace culture emphasizes the development of new skills?
Archy [21]
Involvement is the answer just took it. thank you

6 0
3 years ago
Read 2 more answers
Suppose you were assigned to develop a logical model of the registration system at a school or college. Would you be better off
BaLLatris [955]

Answer:

top down approach

Explanation:

Top down approach is process of breaking down system into sub-system which helps in formulating the overall system. At the end every sub system can be refined with more details.

While bottom up approach is process of gathering systems to design large complex system.

Top down is better as basic information is present and resources can be utilized effectively without impacting maintennance and operations.

6 0
3 years ago
Other questions:
  • You press the power button in order to start your computer but hear nothing and see nothing. Name 2 possible reasons for this.
    6·1 answer
  • Write a function called lucky_sevens that takes in one #parameter, a string variable named a_string. Your function #should retur
    15·1 answer
  • Using hard disk to temporarily store data or instructions from ram is referred to as the
    12·1 answer
  • Exercise#3: Write a ch program that performs the following: Declare a two arrays called arrayA and arrayB that holds integer and
    6·1 answer
  • A garments manufacturing company buys various types of natural and synthetic materials to produce clothes. Which material is a s
    6·2 answers
  • You press the F9 key to convert an object to a symbol true or false​
    12·1 answer
  • You have imported a library with the birthMonth() function. Based on the API, how many strings are inputed to calculate the birt
    11·1 answer
  • A toolbar of round buttons that appear when you move the mouse when in Slide Show view id called ____________.A toolbar of round
    8·1 answer
  • A company creates a ______by using a wireless access point (WAP) and an Internet connection. Select the two correct answers, the
    11·1 answer
  • Q3: What do you mean by a pointer to a pointer? Can this be extended?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!