Advertisement
dllbridge

Untitled

Jul 14th, 2024
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.12 KB | None | 0 0
  1.  
  2. #include       <stdio.h>
  3.  
  4.  
  5. char   c     =        'H';
  6.  
  7. char  sz[99] =     "SONY";
  8.  
  9. int nArr[99] = {100, 101};
  10.  
  11. void  foo();  
  12. void _foo();  
  13. ////////////////////////////////////////////////////
  14. int main()                                        //
  15. {
  16.    
  17.     printf("c  = %d\n",  c    );
  18.     printf("c  = %c\n",  c    );
  19.     printf("sz = %s\n",  sz   );
  20.     printf("sz = %s\n", &sz[0]);  
  21.     printf("sz = %c\n",  sz[0]);    
  22.     printf("sz = %s\n", &sz[1]);  
  23.    
  24.    _foo();        
  25. }
  26.  
  27.  
  28.  
  29.  
  30. /////////////////////////////////////////////////////
  31. void foo()                                         //
  32. {
  33.      
  34.      printf(" - - - - - - - - - - -\n");
  35.        
  36.      for(int i = 0; i < 5; i++)
  37.      {
  38.      
  39.          printf("%d\n",  sz[i]);
  40.      }
  41.        
  42. }
  43.  
  44.  
  45.  
  46.  
  47. /////////////////////////////////////////////////////
  48. void _foo()                                         //
  49. {
  50.      
  51.      printf(" - - - - - - - - - - -\n");
  52.      
  53.      int i = 0;  
  54.      
  55.      
  56. L_01:  printf("%d\n", sz[i]);    
  57.  
  58.        i ++;
  59.      
  60.        if( i < 5) goto  L_01;
  61.    
  62.        
  63. }
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement