#include <stdio.h>


int main(void)

{

char ASCII = 0; //char 로 값을 받음.


printf("아스키 값 입력!: \n");

scanf_s("%d", &ASCII); // %d로 입력을 받아야함. %c는 글자 입력받는거라 사용하면 안됨



printf("그 글자는 %c! 와하하핳 \n", ASCII);//char 형이므로 ASCII 형태로 출력이 된다.

system("pause");

return 0;

}


Run-Time Check Failure #2 - Stack around the variable 'ASCII' was corrupted.


이게 왜 나는건가요?