Because the s type conversion is a pointer to a string, we can do a few other pointer arithmetic tricks, as follows:
printf("Sub-string output\n");
printf("%%.7s [%.7s] 3rd word (using array offset)\n",&pStr[9]);
printf("%%.12s[%.12s] 3rd and 4th words (using pointer
arithmetic)\n\n" ,pStr + 9 );
The first string output uses both precision and a pointer offset to print program. The second string output again uses precision but also uses pointer arithmetic to print program with.