March 2019
Intermediate to advanced
336 pages
9h 9m
English
The main method in the following code snippet invokes the changeMatrix method after initializing the matrix. The changed matrix is printed after the invocation of the changeMatrix method:
//main methodfunc main() { var matrix = [3][3] int {{1,0,0},{0,0,0},{0,0,0}} printMatrix(matrix) matrix = changeMatrix(matrix) printMatrix(matrix)}
Run the following command to execute the boolean_matrix.go file:
go run boolean_matrix.go
The output is as follows:

The next section talks about multi-dimensional arrays.
Read now
Unlock full access