Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. char texto1[30];
  5. char texto2[30];
  6.  
  7. printf("Diite um texto de ate 30 caracteres: ");
  8. gets(texto1);
  9. int i = 0;
  10. for(i = 0; i<sizeof(texto1) && texto1[i] != '\0'; i++){
  11. texto2[i] = texto1[i];
  12. }
  13. printf("%s", texto2);
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement