SINGLE DIMENSION ARRAYS

Card Set Information

Author:
randycapped
ID:
251977
Filename:
SINGLE DIMENSION ARRAYS
Updated:
2013-12-09 13:09:30
Tags:
ARRAYS
Folders:

Description:
SINGLE DIMENSION ARRAYS
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user randycapped on FreezingBlue Flashcards. What would you like to do?


  1. When you pass an array to a method, the method receives the __________ of the array.
    reference
  2. _______ search is more efficient than ________ search for finding an element in the array.
    • binary
    • linear
  3. ________ ______ finds the smallest number in the list and swaps it with the first element.
    Selection sort
  4. Programmers often mistakenly reference the first element in an array with index 1, but it should be 0. What is this called?
    Off by one error
  5. An array variable is not a ________ data type variable.
    primitive
  6. An array variable contains a ________ to an array
    reference
  7. _________ reduce the number of statements needed.
    Arrays
  8. Array subscripts must be __________, initialized to ____ at the beginning, and incremented by ___ each time the logic passes through the loop in order to get to the next element.
    • integers
    • 0
    • 1
  9. Program should stop searching the array when a match is found. You do this by _________ a value.
    forcing
  10. _____-______ loop are a convenient tool for working with arrays.
    For next
  11. Your subscript is ______ ___ ______ if it is not within a defined range of acceptable subscripts.
    out of bounds
  12. Arrays are like software "_________".
    shelves
  13. To search an array:

    First, _______ the subscript.
    Then test each array ______ _____ in a loop.
    And finally, set a _______ when a match is found.
    • initialize
    • element value
    • flag
  14. In parallel arrays:

    Each _______ in one array is associated with a corresponding _________ in a second array.

    Corresponding elements have the same _______ position.
    • element
    • element
    • relative
  15. For ________ ________, store either the low or high end value of each range and compare your current position with that stored limit.
    range comparisons
  16. Arrays are a series or list of _________ in memory.
    variables
  17. All elements in an array have the same ______ and ________.
    • name
    • type
  18. Each element in an array has a different  _________ (or index).
    subscript
  19. Some array values are determined during program execution by selections made by ______.
    users
  20. An ________ is how far from the beginning that an array's element is located in memory.
    offset
  21. Every element in an array has the same name, but a different ________ or _________.
    • offset
    • index
  22. _________ are individual items "shelves" in the array.
    Elements
  23. _______ of ________ is the number of elements in this array.
    • Size
    • array
  24. Data types will be either ________ or ________, but never both or mixed.
    • string
    • numeric
  25. To create an array in JAVA, you must _______, _________ and ________.
    • declare
    • create
    • initialize
  26. Subscripts are a sequence of ________.
    integers
  27. Java uses __________ to denote subscripts.
    [] brackets
  28. Subscripts are placed in ________ or _________ following the array group name.
    • parantheses()
    • brackets[]
  29. Every array has ______ size.
    finite
  30. Every array has a fixed number of _________.
    elements
  31. Every array has a fixed number of _______ in the array.
    bytes
  32. Array elements have the same _______ type.
    data
  33. The number of bytes in an array is always a multiple of the number of array ________.
    elements
  34. ________ is a variable that indicates when an event occurred.
    Flag
  35. In parallel arrays, each element in one array is associated with an element in ________ ________ ______ in other array.
    same relative position
  36. When using parallel arrays, two or more arrays contain ________ data.
    related
  37. A _________ relates the arrays together.
    subscript
  38. Constants in arrays can be used as the ______ of an array (how many elements), as array ________ (contents of the variable spaces) or as ________ (aka indexes)
    • size
    • values
    • subscripts
  39. Declare a _______ _______ constant to be used every time array is accessed.
    named numeric

    • Example:
    • If birthyear < YrAgeTwentyOne then
    •     purchase of alcohol is legal
    • Endif
  40. Program logic assumes every number entered by the user is __________.
    valid
  41. Invalid array subscript is a __________ error.
    logical
  42. The "for-next loop" is a single statement that:

    1. ___________ loop control variable.
    2. ___________ it to a limit.
    3. ___________ it.
    • Initializes
    • Compares
    • Alters
  43. What is the representation of the third element in an array called "a"?
    a[2]

What would you like to do?

Home > Flashcards > Print Preview