0
Hello! Help solve the problem : Enter a string, cut out 3 letters (for example : book -> k )
4 Respostas
+ 5
Do you always want the first three letters to be cut out?
In that case, you could print
str + 3
to get the desired output, which is basically printing the string starting at the fourth character. However, it might be a good idea to check if the string is actually longer than three characters, otherwise accessing the string outside of its bounds could lead to some unexpected outcome. Or just null-initialize the string, in which case checking the string length becomes redundant, i.e.
char str[ 10 ] = {};
0
I'm sorry, but I don't understand.Can you show me?
0
Thank you
0
Give the best answer to shadow, giving a good details.