Arrays: Test Review Arrays

Screen Shot 2014-12-07 at 12.13.44 PM

Arrays Test Review

  • One Dimensional arrays:
    1. Create arrays and initialize them with a loop.
    2. Initialize an array when created.
    3. Find the number of elements in an array.
    4. Check an array’s bounds.
    5. Swapping elements of an array – permutations (sampling without replacement)
    6. Given an array of N elements, write the code to shuffle them using the random feature.
    7. Find the max – min of the elements.
    8. Reverse the elements.
    9. Find the average of the elements.
    10. Print each element.
    11. Sieve of Erasthostenes http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
    12. Arrays as frequency or counters.
    13. What types must be used as indices for arrays?