matrix c declaration
int disp[2][4] = { 10, 11, 12, 13, 14, 15, 16, 17};
matrix c declaration
int disp[2][4] = { 10, 11, 12, 13, 14, 15, 16, 17};
double array in c
int disp[2][4] = {
{10, 11, 12, 13},
{14, 15, 16, 17}
};
C print 2D array
#include <stdio.h>
#define MAX 10
int main()
{
char grid[MAX][MAX];
int i,j,row,col;
printf("Please enter your grid size: ");
scanf("%d %d", &row, &col);
for (i = 0; i < row; i++) {
for (j = 0; j < col; j++) {
grid[i][j] = '.';
printf("%c ", grid[i][j]);
}
printf("\n");
}
return 0;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us