Computer Science, asked by ushamanjappa99, 10 months ago

to add motrices wing 2D array's along
I write a C program
with mand tracing.​

Answers

Answered by queensp73
0

Answer:

#include<stdio.h>

int main(){

  /* 2D array declaration*/

  int disp[2][3];

  /*Counter variables for the loop*/

  int i, j;

  for(i=0; i<2; i++) {

     for(j=0;j<3;j++) {

        printf("Enter value for disp[%d][%d]:", i, j);

        scanf("%d", &disp[i][j]);

     }

  }

  //Displaying array elements

  printf("Two Dimensional array elements:\n");

  for(i=0; i<2; i++) {

     for(j=0;j<3;j++) {

        printf("%d ", disp[i][j]);

        if(j==2){

           printf("\n");

        }

     }

  }

  return 0;

}

Explanation:

hope t helps u

:)

Similar questions