I'd like some help on the following question:
I have a char
with a text of 32 characters, so I would like to know how to separate this char
into two of 16 characters.
Type:
char textao[32] = "Oi meu nome e Cesar tudo bem ai?"
And it has to stay:
char textoInicio[16] = "Oi meu nome e Ce"
char textoFim[16] = "sar tudo bem ai?"
I used strncpy(textoInicio, textao, 16)
for the first part and it worked. Now I do not know how to do it for the second time. I also did not want to use for
.
Any tips?