Created
June 2, 2011 17:21
-
-
Save anonymous/1004849 to your computer and use it in GitHub Desktop.
Código para ler string
This file contains 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(int argc, char **argv) | |
{ | |
/* uma string é um array de chars, | |
coloquei o número 50 supondo que | |
vc não vai colocar mais que 50 | |
caracteres no buffer */ | |
char nome[50]; | |
printf("Entre com o seu nome"); //vai pedir um nome | |
gets(nomecompleto); //digite seu nome inteiro | |
printf("O nome é: %s", nomecompleto); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment