Lecture 51
Array
// Double Dimensional Array
#include <iostream>
#include <conio.h>
using namespace std;
main ()
{
int
arr[2][2]={12,23,2,24};
int
arr1[][2]={14,26,27,29};
cout<<"1
Array \n";
cout<<arr[0][0]<<"
"<<arr[0][1]<<"\n"
<<arr[1][0]<<"
"<<arr[1][1];
cout<<"\n2 Array \n";
cout<<arr1[0][0]<<"
"<<arr1[0][1]<<"\n"
<<arr1[1][0]<<" "<<arr1[1][1];
getch();
return 0;
}
Code view in dev compiler:
Compile the program Ctrl+F9
Run program Ctrl+F10