online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <stdio.h> #include <time.h> #include <stdlib.h> #define N 5 #define M 6 int main() { int m[N][M]; srand(time(NULL)); for(int i = 0; i < N; i++) { for(int j = 0; j < M; j++) { m[i][j] = rand() % 100; printf("%2d ", m[i][j]); } printf("\n"); } for(int i = 0; i < M - 1; i++) { for(int j = 0; j < M - i - 1; j++) { if (m[1][j] < m[1][j + 1]) { for(int k = 0; k < N; k++) { int temp = m[k][j]; m[k][j] = m[k][j + 1]; m[k][j + 1] = temp; } } } } printf("\n"); for(int i = 0; i < N; i++) { for(int j = 0; j < M; j++) printf("%2d ", m[i][j]); printf("\n"); } 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