online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include<stdio.h> void main() { int i, n, temp, j, arr[10]; printf("\nEnter the number of elements in the array : "); scanf("%d", &n); printf("\nEnter the elements: "); for(i=0;i<n;i++) { scanf("%d", &arr[i]); } for(i=0;i<n;i++) { for(j=0; j < n-i-1; j++) { if(arr[j]>arr[j+1]) { temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; } } } printf("\nThe array sorted in ascending order is :\n"); for(i=0;i<n;i++) { printf("%d\t", arr[i]); } }

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