Let\'s say I have a char* str = \"0123456789\" and I want to cut the first and the last three letters and print just the middle, what is the simplest, and safes
I believe there is some magic you can do with printf that will only print a certain number of characters, but it's not commonly understood or used. We tried to do it at a previous job and couldn't get it to work consistently.
What I would do is save off a character, null that character in the string, print it, then save it back.