Created
December 17, 2018 13:46
-
-
Save ivanelson/d9a4e6c8d91cf6a7d895484f551393a3 to your computer and use it in GitHub Desktop.
Vetor de Caracteres (String)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
char str[] = "meu string"; /*reserva espaço para 11 caracteres*/ | |
/* Vou alterar o caracter da sexta posição do vetor str[] */ | |
str[5] = 'd'; | |
printf("Ou seja troquei o t pelo d na frase: meu string -> %s ",str); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment