030. 캐스트 연산자 이해하기030. 캐스트 연산자 이해하기
Posted at 2010. 11. 12. 03:21 | Posted in Computer/초보자를 위한 C 언어 300제#include <stdio.h> main() { int x = 5, y = 2; printf( "%d \n", x / y ); // 2 printf( "%f \n", (double)x / y ); // 2.500000 }
'Computer > 초보자를 위한 C 언어 300제' 카테고리의 다른 글
032. 중첩 조건문 이해하기(if~else) (0) | 2010.11.13 |
---|---|
031. sizeof 연산자 이해하기 (0) | 2010.11.13 |
029. 비트 연산자 이해하기(|, &, ~, ^, <<, >>) (0) | 2010.11.12 |
028. 쉼표 연산자 이해하기(,) (0) | 2010.11.12 |
027. 조건 연산자 이해하기(?:) (0) | 2010.11.12 |