PRINCIPLES OF PROGRAMMING LANGUAGES
PRACT. Memory Implementation of 2D Array.
#include <iostream>
using namespace std;
PRACT. Memory Implementation of 2D Array.
#include <iostream>
using namespace std;
int main()
{
int arr[3][2];
cout << “Enter 06 values: n”;
for (int j = 0; j < 3; ++j)
{
for(int k = 0; k < 2; ++k )
{
cin >> arr[j][k];
}
}
cout<<“nDisplaying Value stored:”<<endl;
for(int j = 0; j < 3; ++j)
{
for(int k = 0; k < 2; ++k)
{
cout<< “arr[” << j << “][” << k << “] = ” << arr[j][k] << endl;
}
}
return 0;
}