Advertisement
Guest User

HOGINHO

a guest
Oct 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4. #include <string.h>
  5.  
  6. void funcaoTeste(char *x, char *y);
  7.  
  8. int main(int argc, char const *argv[]){
  9.  
  10. char x[11];
  11. char y[11];
  12.  
  13. printf("Insira x:");
  14. scanf("%s", &x);
  15. printf("\n");
  16. printf("Insira y:");
  17. scanf("%s", &y);
  18. printf("\n");
  19.  
  20.  
  21. funcaoTeste(x, y);
  22.  
  23.  
  24.  
  25. printf("%s", x);
  26. printf("\n");
  27. printf("%s", y);
  28.    
  29.  
  30. }
  31.  
  32. void funcaoTeste(char *x, char *y) {
  33.  
  34.    strcpy(x,  "XX");
  35.    strcpy(y,  "YY");
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement