for and arrays



I understand this code.

int a[5];
int b;
for (b=0;b<5;b=b+1)
int a[b];

This should take every element of the array a and set it to 1,2,3,4,5.
Great. Now for the big question. How would you work this?

int a [5][3];

And make the first element of 5 all zeros and the second element of 3 equal
to 1,2,3 ? I don't know how to work with a 2 dimensional array.

Bill


.



Relevant Pages

  • (patch for Bash) regex case statement
    ... Following up on my previous patch for regex conditional tests, ... /* Return an array of strings; ... int dollarflag, zeropad, compareflag; ... SHELL_VAR *var; ...
    (comp.unix.shell)
  • Passing a 2-dimensional array
    ... Earlier I asked a question about passing an array to a user defined ... I need to pass a 2 dimensional array and I tried but cannot figure out how ... extern void fillArray (int arrayQuizzes[], int numStudents, int numQuizzes); ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Strategy or Iterator?
    ... It would be possible to write a class that returns the variations ... GNU General Public License for more details. ... protected CombinatoricOperator(Telements, int r) { ... An integer array backing up the original one to keep track of the ...
    (comp.lang.java.programmer)
  • (patch for Bash) regex conditional tests
    ... 'regex' are returned in array variable SUBMATCH. ... Skipping of positional parameters, array elements, string ... int dollarflag, zeropad, compareflag; ... SHELL_VAR *var; ...
    (comp.unix.shell)
  • Passing Dynaically-Sized Arrays
    ... The situation I have is I need to create an array but I do not know the ... determines the size and then creates and populates it. ... void MakeIVector(int *iv, int n1) { ... In main a 1 dimensional array is created, ...
    (comp.lang.c)