online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> int main() { char ch; char str[10]; int i; float f; printf("문자λ₯Ό μž…λ ₯ν•˜μ„Έμš”: "); scanf("%c", &ch); printf("λ¬Έμžμ—΄μ„ μž…λ ₯ν•˜μ„Έμš”"); scanf("%s", str); printf("μž…λ ₯받은 문자: %c\n", ch); printf("μž…λ ₯받은 λ¬Έμžμ—΄: %s\n", str); printf("μ •μˆ˜λ₯Ό μž…λ ₯ν•˜μ„Έμš”: "); scanf("%d", &i); printf("μ‹€μˆ˜λ₯Ό μž…λ ₯ν•˜μ„Έμš”: "); scanf("%f", &f); printf("μž…λ ₯받은 μ •μˆ˜: %d\n", i); printf("μž…λ ₯받은 μ‹€μˆ˜: %f\n", f); /* 심화 탐ꡬ(float의 ν•œκ³„) f에 32.12λ₯Ό μž…λ ₯ ν›„ scanf둜 좜λ ₯ν•˜λ©΄ 32.119999λ₯Ό 좜λ ₯ν•œλ‹€. => 32λŠ” 2μ§„μˆ˜ λ³€ν™˜μ‹œ 100000으둜 κ°ˆλ”ν•˜κ²Œ μ „ν™˜ λ˜μ§€λ§Œ, 0.12λŠ” 0.000111011...λ¬΄ν•œ μ†Œμˆ˜ ν˜•νƒœλ‘œ λ³€ν™˜λ¨ λ˜ν•œ float은 λΆ€λ™μ†Œμˆ˜μ  λ°©μ‹μœΌλ‘œ 자료λ₯Ό μžλ¦„ printfλŠ” 2μ§„μˆ˜λ₯Ό 10μ§„μˆ˜λ‘œ ν‘œν˜„ν•˜λŠ” 것이기에 자λ₯Έ λΆ€λΆ„μœΌλ‘œ λ¬΄ν•œμ†Œμˆ˜κ°€ ν‘œν˜„ λœλŠ” 것 이기에 32.119999κ°€ 좜λ ₯됨 심화 탐ꡬ(float λŒ€μ‹  doubleμ“°λ©΄ μ•ˆλ¨?) double μžλ£Œν˜• 8λ°”μ΄νŠΈ, float은 4λ°”μ΄νŠΈμ΄κΈ°μ— 더 큰 λ©”λͺ¨λ¦¬λ₯Ό μ‚¬μš©ν•˜κΈ°μ— 'λ©”λͺ¨λ¦¬ 효율'κ³Ό 'μ—°μ‚° 속도와 μΊμ‹œ 효율'에 뢀정적 μ›μΈμœΌλ‘œ μž‘μš©ν•œλ‹€. κ²Œμž„ μ—”μ§„ 개발자의 μ‹œμ„ μœΌλ‘  연산이 λŠλ €μ§€λ©΄ μ—”μ§„ λ°˜μ‘μ„±μ΄ λŠλ €μ§€κ³  μ΄λŠ” 객체간 μΆœλ™ 문제λ₯Ό λ°œμƒν•¨ λ©”λͺ¨λ¦¬ 효율의 λ¬Έμ œλŠ” κ²Œμž„ μ—”μ§„ λ¬΄κ±°μ›Œμ Έ μž‘λ™μ— μš”κ΅¬ν•˜λŠ” μžμ›μ˜ 양이 증가할 수 있음 */ 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