MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-C-Programming-Course / main

Function main

Chapter 7/07_array_2d.c:3–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include <stdio.h>
2
3int main()
4{
5 int arr[3][2];
6
7 for (int i = 0; i < 3; i++)
8 {
9 for (int j = 0; j < 2; j++)
10 {
11 printf("Enter the value of arr[%d][%d]\n", i, j);
12 scanf("%d", &arr[i][j]);
13 }
14 }
15
16 // for (int i = 0; i < 3; i++)
17 // {
18 // for (int j = 0; j < 2; j++)
19 // {
20 // printf("The value of arr[%d][%d] is %d\n", i, j, arr[i][j]);
21 // }
22 // }
23
24 for (int i = 0; i < 3; i++)
25 {
26 for (int j = 0; j < 2; j++)
27 {
28 printf("%d ", arr[i][j]);
29 }
30 printf("\n");
31 }
32
33 return 0;
34}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected