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
}
//