More actions
imported>smksyj No edit summary |
imported>smksyj No edit summary |
||
| Line 16: | Line 16: | ||
*** 값의 범위 | *** 값의 범위 | ||
** 기본 타입 | ** 기본 타입 | ||
*** \ | *** \[unsigned] char, \[[unsigned\]] int, float, double, +(long) | ||
*** overflow, underflow | *** overflow, underflow | ||
** extra | ** extra | ||
Revision as of 02:45, 27 March 2014
진행
- 변수
- C 프로그램이 메모리에 올라갔을 때의 메모리 구조
- 변수 선언과 초기화
- type variable_name; 형태
- type variable_name = value; 형태
- 변수 이름(identifier) 제약
- 상수
- const를 이용한 상수와 #define을 이용한 상수
- 전처리기? 아마 나중에 다뤄야 할 듯
- 왜! const를 쓰는가? -> 설명해 줘도 와 닿지는 않을듯
- 타입
- 일반론
- 크기
- 값의 형태
- 값의 범위
- 기본 타입
- \[unsigned] char, \unsigned\ int, float, double, +(long)
- overflow, underflow
- extra
- 문자열(char *)
- ASCII -> 그냥 숫자
#include <stdio.h>
int main(int argc, char *argv[]) {
int temp = 0;
scanf("%d", &temp); // enter 65 to temp
printf("%c\n", temp); // print 'A'
return 0;
}
- escape character
- 조건문
- if, if-else, if-else if-else
- expression
- 비교 연산자(<, >, <=, >=, ==, !=)
- switch-case
- printf와 scanf의 사용