c print string %s code example Example: print a part of string c int length = 5; printf("%*.*s", length, length, "hello there");