C언어 기초공부
While 문과 Null 문자
하얀소닉
2015. 2. 22. 07:29
- #include <stdio.h>
- int main(void)
- {
- int num = 0;
- char person[6] = "상인1";
- while (num < sizeof(person))
- {
- num++;
- if (num == sizeof(person))
- }
- return 0;
- }
Null문자가 존재함과 동시에 한글이 2Byte를 차지함을 디버깅을 통해 알 수 있다.
디버그 - 디버깅 시작