Arrays

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Geekibz
    New Member
    • Jan 2008
    • 12

    Arrays

    Hi Just started learning arrays.In C how do you repersent 3 d arrays?
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    You just add the number of array indexes for the number of dimensions you require

    [code=c]
    int array1d[10]; /* A 1 dimensional array */
    int array2d[10][10]; /* A 2 dimensional array */
    int array3d[10][10][10]; /* A 3 dimensional array */
    [/code]

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Read this: http://www.thescripts.com/forum/thread772412.html.

      Comment

      Working...