Question
can someone help with this please Consider the attached code DisplayArray.c . Complete the following function display_array_using_pointer_2_array. here is the code #include void display_array_normal(
can someone help with this please
Consider the attached code DisplayArray.c.
Complete the following function display_array_using_pointer_2_array.
here is the code "
#include
void display_array_normal( int p1[][3][4][5]){
int i, j, k, l;
for ( i = 0; i < 2; i++) for (j = 0; j < 3; j++) for ( k = 0; k < 4; k++) for ( l = 0; l < 5; l++) printf("%d ", p1[i][j][k][l]);
putchar(' '); putchar(' '); }
void display_array_using_pointer_2_array( int (*ptr)[3][4][5]){
}
int main(){
int i, j, k, l;
int num = 0;
int z[2][3][4][5];
for ( i = 0; i < 2; i++) for (j = 0; j < 3; j++) for ( k = 0; k < 4; k++) for ( l = 0; l < 5; l++){ z[i][j][k][l] = num++; }
int (*ptr)[3][4][5] = z;
display_array_normal(z); display_array_using_pointer_2_array(ptr);
return 0;
}
"
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started