online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> void bubbleSortAscending(int arr[], int n){ // 배열을 μ˜€λ¦„μ°¨μˆœμœΌλ‘œ μ •λ ¬ν•˜λŠ” ν•¨μˆ˜ for(int i = 0; i < n -1; i++){ // 정렬을 μœ„ν•œ 전체 λ°˜λ³΅μ„ κ΄€λ¦¬ν•˜λŠ” for λ¬Έ for(int j = 0; j < n - i -1; j++){ // ν•­λͺ©μ„ λΉ„κ΅ν•˜κ³  κ΅ν™˜ν•˜λŠ” for λ¬Έ if(arr[j] > arr[j + 1]){ // ν™•μΈλ¬Έμ œ- λ‚΄λ¦Όμ°¨μˆœ μ •λ ¬ - if(arr[j] < arr[j +1]){ int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; // λ³€μˆ˜μ˜ μŠ€μ™‘ 기법을 μ΄μš©ν•œ κ°’ κ΅ν™˜ } } } } int main(){ int arr[] = {7, 4, 5, 1, 3}; int n = sizeof(arr) / sizeof(arr[0]); printf("초기 μƒνƒœ λ°°μ—΄:["); for(int i = 0; i < n; i++) printf("%d", arr[i]); printf("]\n"); bubbleSortAscending(arr,n); printf("μ •λ ¬λœ λ°°μ—΄: ["); for(int i = 0; i < n; i++) printf("%d", arr[i]); 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