2d Array In C

[Solved] 2d Array In C | Vb - Code Explorer | yomemimo.com
Question : 2 dimensional array in c

Answered by : long-ladybird-icau66r9waxk

#include<stdio.h>
int main(){ /* 2D array declaration*/ int abc[5][4]; /*Counter variables for the loop*/ int i, j; for(i=0; i<5; i++) { for(j=0;j<4;j++) { printf("Enter value for abc[%d][%d]:", i, j); scanf("%d", &abc[i][j]); } } return 0;
}

Source : https://beginnersbook.com/2014/01/2d-arrays-in-c-example/ | Last Update : Sat, 29 Jan 22

Question : 2d array in c

Answered by : adventurous-alligator-xun6ez8jjwtk

#include <stdio.h>
int main(){ int scores[3][3],i,j; for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf("a[%d][%d] = ",i,j); scanf("%d",&scores[i][j]); } }
printf("\n Matrix view: \n");
for (i=0;i<3;i++)
{ for (j=0;j<3;j++){ printf("%d\t",scores[i][j]); } printf("\n");
}
}

Source : | Last Update : Thu, 28 Jul 22

Question : 2D Array In C

Answered by : fragile-fly-m1lm5kv3ml6t

// Array of size n * m, where n may not equal m
for(j = 0; j < n; j++)
{ for(i = 0; i < m; i++) { array[i][j] = 0; }
}

Source : https://stackoverflow.com/questions/2516096/fastest-way-to-zero-out-a-2d-array-in-c | Last Update : Wed, 19 May 21

Answers related to 2d array in c

Code Explorer Popular Question For Vb