1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

2 dimensional Arrays

Discussion in 'C' started by snehaD, Dec 10, 2015.

  1. snehaD

    snehaD New Member

    Joined:
    Dec 10, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi friends I need to use 2 dimensional array in my project.

    I need to bring the Output in this format

    Eg i[0]j[0] i[1]j[1], i[2]j[2] using for each loop . My array size is 6 i[6] j[6] both are integers .It first go and calculate the I th value i=0 and then it come to J th for loop and calculate the J=0 . then it again go to i[1] and j[1] .. Please any one tell me the program for this kind of looping. :thinking::thinking:

    Thanks..
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    I'm having some difficulty working out what you're talking about.

    For starters C does not have a "for each" loop. Did you post this in the wrong section?

    All your I's and J's are one-dimensional arrays. int p[5][10]; would be a 2 dimensional array.

    Could you give a simple example of the kind of output your program should display? And if necessary how that output relates to any input you would give it?
     

Share This Page