C언어 (5) 썸네일형 리스트형 2019.12.07 C언어 기초 플러스 3일차(2일차하고 이어짐) 2. 1 2 3 4 5 6 7 8 9 10 11 12 #include int main() { int a; printf("아스키코드를 입력하시오 : "); scanf("%d", &a); printf("%d에 해당하는 문자 : %c", a, a); return 0; } http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs 3. 1 2 3 4 5 6 7 8 9 #include int main(.. 2019.12.06 C언어 기초 플러스 2일차(2) 8진수 표기 시 %o 16진수 표기 시 %x 접두사와 함께 표기 시 %#o, %#x %#X printf()함수는 unsigned int 값을 출력하기 위해 %u 지정자를 사용한다) long 접미사 = l, L long long 접미사 = ll, LL unsigned long long 접미사 = ull llu LLU ULL long 값 출력시 %ld %lx %xo short 값 출력시 %hd %hx %ho unsigned long %lu long long %lld %llu \a 경보음 \b 백스페이스 \f 폼 피드 \b 개행 \r 캐리지 리턴 \t 수평 탭 \v 수직 탭 \\ 백슬래시 \' 작은따옴표 \" 큰따옴표 \? 물음표 \Ooo 8진수 값(o는 8진수 숫자) \xhh 16진수 값(h는 16진수 숫자.. 2019.12.06 C언어 기초 플러스 2일차(1) 1. 다음과 같은 종류의 각 데이터에는 어떤 데이터형을 사용해야 하는가? (때로는 한 가지 이상의 데이터형이 적용될 수도 있다.) a. 서울시 인구 b. DVD 영화 제작비 c. 이 장에서 가장 많이 사용한 글자 d. 이 장에 그 글자가 나타난 횟수 -> a. int b. float or double c. char d. int 2. int형 대신 long형 변수를 사용하는 이유는 무엇인가? -> int형보다 long형이 더 큰 수를 수용할 수 있어서 3. 32비트 부호 있는 정수를 얻기 위해서는 어떤 이식 가능한 데이터형들을 할 수 있는가? 각각의 데이터형을 선택한 이유는 무엇인가? -> int32_t, int_least32_t, int_fast32_t 4. 다음과 같은 각 상수들에 대해 데이터형과 의미.. 2019.12.05 C언어 기초 플러스 1일차(2) 1. 1 2 3 4 5 6 7 8 9 10 11 #include int main() { printf("Gustav Mahler\n"); printf("Gustav\nMahler\n"); printf("Gustav"); printf(" Mahler"); return 0; } http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs 3. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #include int main() { int myyear; int mymonth; myyear = 19; mymonth = myyear * 365; printf("My Age : %d\n", myyea.. 2019.12.05 C언어 기초 플러스 1일차(1) 챕터 2 복습 문제 1. c 프로그램을 구성하는 기본 모듈을 무엇이라 부르는가? 함수(function) 2. 신택스 에러란? 문장 또는 프로그램을 구성하는 규칙을 위반 한것 3. 시맨틱 에라란? 의미상의 에러 4. 1 2 3 4 5 6 7 8 include studio.h int main{void} ( int s s := 56; print(1년은 s 주에 해당한다.); return 0; http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs -> -> 1 2 3 4 5 6 7 8 9 10 #include int main(void) { int s; s = 52; printf("1년은 %d 주에 해.. 이전 1 다음