online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> // a, bμ—λŠ” 각각 λ³€μˆ˜ a, b의 μ£Όμ†Œκ°€ μ „λ‹¬λ©λ‹ˆλ‹€. void swap(int *a, int *b) { // ν•¨μˆ˜ μ§„μž… 직전 μƒνƒœ 좜λ ₯ printf(" [in swap] before swap: *a=%d, *b=%d\n", *a, *b); printf(" [in swap] pointers: a=%p, b=%p\n", (void*)a, (void*)b); // μ‹€μ œ κ°’ κ΅ν™˜ int temp = *a; *a = *b; *b = temp; // κ΅ν™˜ 직후 μƒνƒœ 좜λ ₯ printf(" [in swap] after swap: *a=%d, *b=%d\n\n", *a, *b); } int main(void) { int a = 10, b = 20; // 호좜 μ „ μƒνƒœ printf("before swap(): a=%d, b=%d\n", a, b); printf("before swap(): &a=%p, &b=%p\n\n", (void*)&a, (void*)&b); // μ£Όμ†Œλ₯Ό λ„˜κ²¨μ„œ μ‹€μ œ λ³€μˆ˜ 값을 κ΅ν™˜ swap(&a, &b); // 호좜 ν›„ μƒνƒœ printf(" after swap(): a=%d, b=%d\n", a, b); 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