Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IFF - Introdução à Programação
- //Slide - Página 42 - Exercicio 1
- #include<stdio.h>
- #include<locale.h>
- #include<string.h>
- int main(){
- setlocale(LC_ALL,"Portuguese");
- char frase[60];
- int i;
- printf("Digite a frase: ");
- gets(frase);
- for(i=0;i<strlen(frase);i++) printf("\"%c\" - alocado no espaço de memória %p\n",frase[i],&frase[i]);
- printf("\nO tamanho da frase inserida foi: %d caracteres.",strlen(frase));
- }
Advertisement
Add Comment
Please, Sign In to add comment