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
Bas_tet [7]
3 years ago
12

Consider the following declaration.int[] alpha = new int[3];Which of the following input statements correctly input values into

alpha?(i)alpha = cin.nextInt();alpha = cin.nextInt();alpha = cin.nextInt();(ii)alpha[0] = cin.nextInt();alpha[1] = cin.nextInt();alpha[2] = cin.nextInt();1. Only (i)2. Only (ii)3. None of these4. Both (i) and (ii)
Computers and Technology
1 answer:
stepladder [879]3 years ago
5 0

Answer:

Option (2) i.e., Only (ii) is the correct option to the following question.

Explanation:

Here, in the following code that is written in the Java Programming Language in which they set integer data type array variable "alpha" and set its index to 3 through "new" keyword then, we get input from the user in the index 0 then, we get input from the user in the index 1 then, again we repeat this step for index 2. So, that's why the following option is correct.

Option 1 is wrong because in this option the user input only in the index 0 and this is also the wrong way to insert value in the array variable.

You might be interested in
This is a while loop question for Information technology.
aev [14]

Answer: use GitHub

Or stack overflow

Explanation:

6 0
3 years ago
What is the ascii code for the letter D
PilotLPTM [1.2K]

Answer:

068

Explanation:

Or if you want binary it's 01000100

4 0
3 years ago
For which product would the producer keep a high profit margin and offer after-sales service?
Zina [86]

What are the products?

6 0
4 years ago
Arcade games such as Donkey Kong, Mr. Dol, and Venture were adapted from arcade titles to home consoles by which company?
Olenka [21]

Answer:

OC

Explanation:

They were adapted from the Coleco company.

3 0
3 years ago
Read 2 more answers
Would anyone be willing to give me free a psn card
maks197457 [2]

Answer:

No??

Explanation:

why would i do that?

6 0
3 years ago
Other questions:
  • In modern computer systems, a byte consists of
    14·1 answer
  • Orifice tubes are A. coded in American models only. B. coded by number for easy identification. C. similarly but not exactly siz
    12·1 answer
  • To what would you compare the transport layer?
    14·1 answer
  • Which is the hanging indent on the ruler?
    10·2 answers
  • Word can store a maximum of how many documents in its Recent Documents area? five ten fifteen twenty
    8·1 answer
  • It is better to refuse to take a field sobriety test than to take a chance on being convicted of a DUI
    9·1 answer
  • Zach would like to reuse a spreadsheet that he created last year. However, he will need to delete the contents of several cells.
    5·1 answer
  • Could someone please help me with this?
    8·1 answer
  • I think you have been doing a great job but you haven’t been signing many people up for our new service feature I want you to se
    8·1 answer
  • Wirte a program which asks the users to input length and calculates the area of a square.( Area = Length^2)​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!