how to print multi dimension array in matrix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rashi agrawal
    New Member
    • Sep 2015
    • 1

    #1

    how to print multi dimension array in matrix

    how to print :
    1) 3 2) 1 2 3 3) 1 2 3 4) 1
    6 5 4 5 5 6 4 5
    7 8 9 7 9 7 8 9
  • Clearner321
    New Member
    • Sep 2015
    • 22

    #2
    Question is not very clear.

    Comment

    • jaseel97
      New Member
      • Feb 2015
      • 16

      #3
      you basically print a 2d array in the form of a matrix using two loops.One nested inside another.One loop to control the row and the other to control the column.

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        You might read this: http://bytes.com/topic/c/insights/77...rrays-revealed

        Then you would know there really aren't multidimensiona l arrays in C or C++. (See the last example).

        Therefore, the simplest method is to iterate the array the array and display each character as you go. If this array is
        [3][4] then just display a \n after each three elements. This requires one loop.

        Comment

        Working...