how to print the first character of a string in c

#include <stdio.h>

int main() {
    char str[] = "example";
    printf("%c\n", str[0]);
    return 0;
}