How To pass 2 dimensional array of strings to a function

This is a discussion on How To pass 2 dimensional array of strings to a function within the C Programming forums, part of the General Programming Boards category; Hello,
How To pass 2 dimensional array of strings to a function??at a go?
means i dont want to pass ...

Ok now can anybody tell me how to do the same job with integer array??i mean please can anybody give me code for that? i have done it by 1 method but anybody knows a sweet and short method for it then please tell me?

A double pointer won't work as a replacement for a 2D array - it only works the other way around, that you can make a 2D array by using a double pointer. If you are going to use a double pointer, you will have to allocate "rows" number of pointers, then assign each pointer to the first element of the rows.

> but anybody knows a sweet and short method for it then please tell me?
Yeah, it's called copy and paste.

If this is your array, int arr[2][3][4];

Then this is your function prototypevoid func ( int arr[2][3][4] );

Yes, you can then fiddle with the prototype to change it into either of these forms, but you don't buy a lot. Some compilers will warn about the left-most dimension not being empty, but apart from that, it's good.
Alternatives:void func ( int arr[][3][4] );
void func ( int (*arr)[3][4] );

Irrespective of the form you choose to write the function prototype / declaration, it would be called withfunc ( arr );

And the usual array access subscripts you would use if the array were in scope will still do what you want inside the function.