◦ 아래의 입력 값을 이용해 실행시켜 보시오. (각 자료형의 표현 범위 이해하기)
◦ 10, -10, 100, -100, 200, -200, 500, -500

#pragma warning(disable:4996)
#include <stdio.h>
int main() {
int input;
char tmp;
printf("입력: ");
scanf("%d", &input);
tmp = input;
printf("\n출력(int)->%d\n", input);
printf("출력(char)->%d\n", tmp);
return 0;
}
하단 링크를 통해 아스키코드(ASCII)와 확장아스키코드(Extended ASCII)에 대하여 좀 더 자세히 설명드리도록 하겠습니다.
https://developer-p.tistory.com/72
아스키코드(ASCII)와 확장아스키코드(Extended ASCII)에 대하여
아스키코드는 American Standard Code for Information Interchange의 약자로서, ASCII라고 불립니다. 또한 ANSI에서 만든 표준 코드체계입니다. 아스키는 각 문자를 7비트로 표현합니다. 따라서 2^7 = 128개의 문..
developer-p.tistory.com

아래 링크는, 스위프트에서 아스키코드를 변경하는 방법에 대한 설명입니다.
https://developer-p.tistory.com/192
스위프트 | 아스키코드 변경 Char to Ascii / Ascii to Char ( Swift UnicodeScalar 사용, asciiValue)
요즘 전 코딩테스트를 준비하면서, 백준 문제를 Swift로 풀고 있습니다. (백준 1157번 - 아스키값이 필요한 문제) 근데 종종 아스키값이 필요할 때가 있습니다. 기억을 하려고 하는데, 매번 쉽게 잊
developer-p.tistory.com
최근댓글