Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

print two dimensional array c++

//this way you can print your array row by row
for (int i = 0; i < row; i++){
	for (int j = 0; j < column; j++){
		cout << array[i][j];
	}
}

//this way you can print your array column by column

for (int i = 0; i < column; i++){
	for (int j = 0; j < row; j++){
		cout << array[i][j];
	}
}
 
PREVIOUS NEXT
Tagged: #print #dimensional #array
ADD COMMENT
Topic
Name
2+2 =