forked from yash28goyal/C
-
Notifications
You must be signed in to change notification settings - Fork 0
/
input_2d_array.c
40 lines (37 loc) · 854 Bytes
/
input_2d_array.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <stdio.h>
int main(){
int A[2][4];
printf("<<<Enter Your Array>>>\n");
for (int i = 0; i < 2; i++)
{
for (int j = 0; j < 4; j++)
{
printf("The %dth index of %dth element is: ",i,j);
scanf("%d", &A[i][j]);
}
printf("\n");
}
printf("Your Array is:");
for (int i = 0; i < 2; i++)
{
printf("(");
for (int j = 0; j < 4; j++)
{
printf("%d,",A[i][j]);
}
printf(")");
}
// Arr(A[2][4]);
return 0;
}
// int Arr(int *A[][]);
// int Arr(int *A[][]){
// for (int i = 0; i < 2; i++)
// {
// for (int j = 0; j < 4; j++)
// {
// printf("The %dth index of %dth element is: %d \n",i,j, A[i][j]);
// }
// printf("\n");
// }
// }