Posts by Higor Luiz • 1 point
1 post
-
-2
votes1
answer34
viewsQ: Swap a character inside a string in c
Why is this substitution of a character within a string not working? int main(){ char *armazena = "XXX", letra = 'a'; letra = armazena[2]; *(armazena+1) = 'a'; printf("%c", armazena[1]); return 0; }…
casked Higor Luiz 1