728x90
C언어 - 변수
compiler = Microsoft Visual C++ 6.0
/* 변수 알아보기 */
#include <stdio.h>
int main()
{
int a;
a = 10;
printf("a의 값은 : %d 입니다 \n", a);
return 0;
}
결과
분석
code | 분석 | |
include | - | 포함하다 |
stdio.h | - | STandard Input Output Header 표준 입출력헤더 |
int a; | - | 정수(-2147483648 ~ 2147483647) 형식의 데이터를 a라는 변수에 저장 |
a = 10; | - | 변수 a에 10이라는 데이터를 집어 넣는다 |
%d | - | 10진수 |
char | - | size(1byte) range(signed: -128 ~ 127 , unsigned: 0 ~ 255) |
short int (short) | - | size(2byte) range(signed: -32768 ~ 32767, unsigned: 0 ~65536) |
int | - | size(4byte) range(signed: -2147483648 ~ 2146483647, unsigned: 0 ~ 4294967295) |
long int (long) | - | size(4byte) range(signed: -2147483648 ~ 2147483647, unsigned: 0 ~ 4294967295) |
bool | - | size(1bye) true | false |
float | - | size(4byte) +/- 3.4e +/-38 ( ~7digits) |
double | - | size(8byte) +/- 1.7e +/-308 (~15digits) |
long double | - | size(8byte) +/- 1.7e +/-308 (~15digits) |
'my_lesson > _C' 카테고리의 다른 글
6. C_lesson 별로만든 트리 program (0) | 2013.09.29 |
---|---|
5. C_lesson 변수 선언 주의사항 (0) | 2013.08.27 |
4. C_lesson 실수형 변수 (0) | 2013.08.25 |
3. C_lesson 변수 와 진수 (0) | 2013.08.25 |
1. C_lesson 시작 Hello C & Tstory (0) | 2013.07.21 |
댓글