Program to Show example of the 2D array of int using pointers.in cpp

Program to Show example of the 2D array of int using pointers in C++ Language, two dimensional array with pointers.

#include
#include


main( )
{
clrscr();

constint r=3;
constint c=3;

int array[r][c],i,j;

cout<<"\n Enter the contents of the 2D array row by row are :\n"<<endl;
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
cin>>*(*(array+i)+j);

cout<

No comments:

Post a Comment