home
Learn
screen_rotation
#include <stdio.h> #include <conio.h> void main(){ int arr[2][3]; int i, j; clrscr(); printf("\n This is 2-d array program."); arr[0][0] = 100; arr[0][1] = 200; arr[0][2] = 300; arr[1][0] = 200; arr[1][1] = 400; arr[1][2] = 100; for(i=0;i<2;i++){ for(j=0;j<3;j++){ printf("\n value of arr[%d][%d] = %d",i,j,arr[i][j]); } } getch(); }
Program Output
This is 2-d array program. value of arr[0][0] = 100 value of arr[0][1] = 200 value of arr[0][2] = 300 value of arr[1][0] = 200 value of arr[1][1] = 400 value of arr[1][2] = 100