online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> // 표준 입출력 함수 int main(){ // 프로그램 시작, main 함수 정의 int a = 1234; // 정수형 변수 a 선언, 1234 저장 // 최소 너비 8칸 출력 printf("[%d]\n", a); // 정수 출력(1234) printf("[%8d]\n", a); // a출력, 너비 8, 오른 쪽 정렬 printf("[%-8d]\n", a); // a출력, 너비 8, 왼쪽 정렬 printf("[%+8d]\n", a); // a출력, 너비 8, 오른 쪽 정렬, 부호 표시(+) printf("[%08d]\n", a); // a출력, 너비 8, 오른 쪽 정렬, 공백 채움(0) printf("[%+08d]\n", a); // a출력, 너비 8, 오른 쪽 정렬, 부호 표시(+), 공백 채움 char b = 'A'; // 문자형(char) 변수 b 선언, A 저장 double c = 3.14159; // 실수형(double)변수 c 선언, 3.14159 저장 printf("[%c]\n", b); // 문자 b 출력(A) printf("[%8c]\n", b); // b 출력, 너비 8, 오른쪽 정렬 printf("[%-8c]\n", b); // b 출력, 너비 8, 왼쪽 정렬 printf("[%f]\n", c); // 실수 c 출력(3.14159), 소수점 아래 여섯 자리 실수 출력(기본) printf("[%8.3f]\n", c); // c 출력, 너비 8, 오른쪽 정렬, 소수점 아래 세 자리 출력 printf("[%-8.3f]\n", c); // c 출력, 너비 8, 왼쪽 정렬, 소수점 아래 세 자리 출력 printf("[%+8.3f]\n", c); // c 출력, 너비 8, 오른쪽 정렬, 부호 표시, 소수점 아래 세 자리 출력 printf("[%08.3f]\n", c); // c 출력, 너비 8, 오른쪽 정렬, 공백 채움, 소수점 아래 세 자리 출력 printf("[%+08.3f]\n", c); // c 출력, 너비 8, 오른쪽 정렬, 부호 표시, 공백 채움, 소수점 아래 세 자리 출력 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