Advertisement
dllbridge

Untitled

Jun 30th, 2024
578
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1.  
  2. #include <string.h>
  3. #include  <stdio.h>
  4.  
  5. int foo(char *psz);
  6.  
  7.  
  8. /////////////////////////////////////////
  9. int main()                             //
  10. {
  11.  
  12.     char szSONY[99] = "WORLD OF THE ";
  13.  
  14.  
  15.     foo(&szSONY[4]);
  16.    // foo( szSONY);    
  17. }
  18.  
  19.  
  20.  
  21.  
  22.  
  23. /////////////////////////////////////////
  24. int foo(char *psz)                     //  
  25. {
  26.  
  27.     for (int a = 0; psz[a] != 0; a++)
  28.     {
  29.        
  30.        printf("WORLD = %c\n", psz[a]);
  31.        
  32.     }
  33.  
  34. }
  35.  
  36.  
  37.  
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement