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