diogoAlves

IFF/Introdução à Programação/Slide/Pag 42/Ex 1

Feb 22nd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. //IFF - Introdução à Programação
  2. //Slide - Página 42 - Exercicio 1
  3. #include<stdio.h>
  4. #include<locale.h>
  5. #include<string.h>
  6.  
  7. int main(){
  8.     setlocale(LC_ALL,"Portuguese");
  9.     char frase[60];
  10.     int i;
  11.     printf("Digite a frase: ");
  12.     gets(frase);
  13.     for(i=0;i<strlen(frase);i++) printf("\"%c\" - alocado no espaço de memória %p\n",frase[i],&frase[i]);
  14.     printf("\nO tamanho da frase inserida foi: %d caracteres.",strlen(frase));
  15. }
Advertisement
Add Comment
Please, Sign In to add comment