Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

2 dimensional array in c

#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 by beginnersbook.com #
 
PREVIOUS NEXT
Tagged: #dimensional #array
ADD COMMENT
Topic
Name
6+6 =