The first argument to printf
is a string of identifiers.
%s refers to a string
%d refers to an integer
%c refers to a character.
Therefore: %s%d%s%c\n prints the string "The first character in sting ", %d prints i, %s prints " is ", and %c prints str[0].