Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. (TCO 11) An array is a list of data items that _____. (Points : 3) are of dif

ID: 3766664 • Letter: 1

Question

1. (TCO 11) An array is a list of data items that _____. (Points : 3)        are of different data types
       are all integers
       have different names
       are indexed

       myList.Flip();
       myList.ReOrder();
       myList.Reverse();
       myList.Swap();

Question 2. 2. (TCO 11) An array that stores seven days of temperature readings can be declared as _____. (Points : 3)        float temp1, temp2, temp3, temp4, temp5, temp6, temp7;
       float [] temp = new float[7];
       float temp[] = new float [7];
       float [] temp = new temp[7];

Explanation / Answer

Question 7. 7. (TCO 11) When the name of an array, such as myArray, is passed to a method, the method receives _ are indexed____.

Question 2. 2. (TCO 11) An array that stores seven days of temperature readings can be declared as _____.       
       float [] temp = new float[7];
       float temp[] = new float [7];

Question 3. 3. (TCO 11) Which statement is true about this array declaration?
                  
                   int [] myArray = {1,4,3,5,6};
It won't compile due to a syntax error. (int myArray[]={1,4,3,5,6};)

Given the following declaration, what is/are the value(s) of age[1,0]?

            int[,] age = { {2, 3, 6, 7},
                           {5, 8, 9, 4} };

According to me syntax is wrong but I am assuming its 2 dimensional array so answer woukd be 5

(TCO 11) In the following code, "val" represents _____.

            int[] size = {2,3,5,6,4,5};
            foreach (int
val in size)
                Console.Write("{0} ",val);

       the value of an array element

. 6. (TCO 11) What will be the output of this code?

            int[] size = { 2, 3, 5, 6, 4, 5 };
            int index = Array.IndexOf(size, 3);
            Console.Write("{0} ", index);

Ans: 1

TCO 11) When the name of an array, such as myArray, is passed to a method, the method receives ____

the starting address of the array

Question 8. 8. (TCO 11) To pass the entire myData array to the DisplayItems method, replace the commented line below with _____.

        static void
Main()
        {
            int[] myData = {1,2,3,4};
             //call DisplayItems
        }
        public static void DisplayItems(params
int[] item)
        {
            for (int i=0; i<item.Length; i++)
                Console.Write("{0} ",item[i]);
       }

DisplayItems(myData);

Question 9. 9. (TCO 12) The size of a(n) _____ must be determined when the program is written, whereas the size of a(n) _____ can be determined when the program is written or at runtime

array, ArrayList

Question 10. 10. (TCO 12) In your program, myList was declared as an ArrayList. To reverse the order of all of the elements in myList, write _____

       myList.Reverse();