The following code should do the trick. Its not the most elagnant code as there is no validation for user inputs.
Also i have kept the interger array a 2 dimentional, if you want u can use a single dimentional array too (with approp changes), but keep it single dimentional across your as it makes the code more readable.
#include <stdio.h>
#define NROWS 3
#define NCOLS 3
static void popArray(int arr[NROWS][NCOLS])
{
int rNo, cNo;
for (rNo=0; rNo<NROWS; rNo++) {
printf ("\nEnter row%d (%d values):", rNo, NCOLS); //put approp message
for (cNo=0; cNo<NCOLS; cNo++) {
scanf("%d", &(arr[rNo][cNo]));
}
}
}
static void printArray(int arr[NROWS][NCOLS])
{
int rNo, cNo;
for (rNo=0; rNo<NROWS; rNo++) {
printf("\n");
for (cNo=0; cNo<NCOLS; cNo++) {
printf("%d ", arr[rNo][cNo]);
}
}
}
int main(void)
{
int myArr[NROWS][NCOLS];
popArray(myArr);
printArray(myArr);
return 0;
}