0
What is the general format of a loop to process the elements in column j of a two dimensional array in cpp?
Multidimensional array
4 Réponses
+ 1
Aadil Ali
That is for accessing total array...
If you to access only a column, then
remove the loop for row, (1st for loop).
And give row i value manually, which is corresponding to your retrive column...
0
Please tag the language.
It differs from python to c to java.
0
for(int i=0;i<rowlength;i++)
{
for(int j=0;j<colomnlength;j++)
cout<<array[i][j] <<" " ;
cout<<endl;
}
Where i represents rows, j represents colomns...
Is this what you looking...?
0
Jayakrishna i wanna access the the columns only