Advertisement
Guest User

Untitled

a guest
Sep 19th, 2016
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void test(char **str);
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7.     char *str = "one";
  8.    
  9.     printf("1->%s\n", str);
  10.     test(&str);
  11.     printf("2->%s\n", str);
  12.    
  13.     return 0;
  14. }
  15.  
  16. void test(char **str)
  17. {
  18.     *str = "two";
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement