online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> /* print the elements of a 2D matrix */ void matrix_print(const int *mat, unsigned int rows, unsigned int columns) { for (unsigned int i = 0; i < rows; i++) { for (unsigned int j = 0; j < columns; j++) { printf("%d ", mat[i * columns + j]); } printf("\n"); } printf("\n"); } int main(void) { const int mat[2][3] = { { 1, 2, 3, }, { 4, 5, 6, }, }; matrix_print(&mat[0][0], 2, 3); return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue