Advertisement
dllbridge

Untitled

May 4th, 2024
681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 KB | None | 0 0
  1.  
  2.  
  3. #include    <stdio.h>
  4. #include   <string.h>
  5.  
  6.  
  7.  
  8. char sz[99] = "SONY";  
  9.    
  10. void foo(char *p);                                 // Заголовок
  11.  
  12.  
  13. ////////////////////////////////////////////////////
  14. int main()                                        //
  15. {
  16.    
  17.    
  18.     printf("%s\n", sz);
  19.    
  20.     foo(sz);
  21.    
  22.     printf("%s\n", sz);
  23. }
  24.  
  25.  
  26.  
  27. ////////////////////////////////////////////////////
  28. void foo(char *p)                                 // Прототип
  29. {
  30.    
  31.      int n = strlen(p);
  32.    
  33. //   printf("n = %d\n", n);
  34.      
  35.      for(int i = 0; i < n; i++)
  36.      {
  37.            
  38.         p[i] = p[i]+1; 
  39.      }
  40. }
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement