1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
 
void Reverse();
 
int main()
{
    printf("Enter a sentence: ");
    Reverse();
    return 0;
}
 
void Reverse()
{
    char c;
    scanf("%c",&c);
    if( c != '\n')
    {
        Reverse();
        printf("%c",c);
    }
}
cs

위 소스에서 Reverse 함수 안의 char 형 c 안에 값은

문자열이 아닌 문자형이기때문에 asd 를 입력하면 a 만 저장되는게 아닌가요 .. ?

실행해보면 asd를 입력 하면 dsa이 출력되는데 어떠한 방식으로 이렇게 나오는지 알고싶습니다.