Advertisement
dllbridge

Untitled

Jan 30th, 2025
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1.  
  2.  
  3. #include  <stdio.h>
  4.  
  5. int n = 91;
  6.  
  7. int *pn = &n;
  8.  
  9.  
  10. void foo(char *);
  11.  
  12. /////////////////////////////////////////////////
  13. int main()                                     //
  14. {
  15.    
  16.     char sz[99] = "SONY";    
  17.    
  18.     printf("%d \n", &sz[0]);
  19.     printf("%d \n", &sz[1]);    
  20.     foo(&sz[0]);
  21. }
  22.  
  23.  
  24. //////////////////////////////////////////////////
  25. void foo(char *p)                               //
  26. {
  27.      
  28.      printf("%c \n", *p);
  29.  
  30.      printf("%c \n", p[-1]);    
  31.      
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement