도데체 머가 문제인지 모르겟네요...ㄷㄷ
찬슬
2023.04.01
질문 제목 : 질문 내용 :
// hello.cpp : 콘솔 응용 프로그램에 대한 진입점을 정의합니다.
//#include stdafx.h
int _tmain(int argc, _tchar* argv[])
{
char asc; printf( 입력: );
scanf(%d,&asc); printf( 출력: %c \n, asc);
return 0;}이거랑// hello.cpp : 콘솔 응용 프로그램에 대한 진입점을 정의합니다.
//#include stdafx.h
int _tmain(int argc, _tchar* argv[])
{
char asc; printf( 입력: );
scanf(%c,&asc); printf( 출력: %d \n, asc);
return 0;}
왜 값이 틀리죠?? a의 아스키코드가 65인데.. 첫번째 꺼에 65치면..오류한번 뜨고 a떠주고..오류는 왜나는건지..
두번째꺼에 a치면 왜 97이 나오는건가요?