Ask Question
18 December, 00:24

In a single statement: declare, create and initialize an array named a of ten elements of type int with the values of the elements (starting with the first) set to 10, 20, ..., 100 respectively.

+3
Answers (1)
  1. 18 December, 02:30
    0
    int[] a = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};

    Explanation:

    //written in java

    The left side int[] a Declare a variable (a) which is of type Integer array (int[]).

    The equal sign (=) assign the right side to the left side.

    The right side initialize the integer array (a) with ten element.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “In a single statement: declare, create and initialize an array named a of ten elements of type int with the values of the elements ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers