35.7 연습문제: 문자열 요소 출력

다음 소스 코드를 완성하여 9가 출력되게 만드세요.

practice_string_array_element.c

#include <stdio.h>

int main()
{
    char s1[30] = "Beethoven 9th Symphony";

    printf("%c\n", _________);

    return 0;
}

실행 결과

9

정답

s1[10]

해설

"Beethoven 9th Symphony"에서 인덱스 10을 꺼내면 9를 출력할 수 있습니다.