Advertisement
dllbridge

Untitled

Nov 24th, 2024
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.66 KB | None | 0 0
  1.  
  2. #include   <stdio.h>
  3. #include  <stdlib.h>
  4. #include  <string.h>
  5.  
  6. char *ppsz[14];
  7.  
  8. void monitor();
  9.  
  10. //////////////////////////////////////////////////////////
  11. int main()                                              //
  12. {
  13.    
  14.    
  15.     char *psz = (char*)malloc(15);
  16.    
  17.     strcpy(psz, "January");
  18.    
  19.     ppsz[1] = psz;
  20.    
  21.    
  22.     psz = (char*)malloc(15);
  23.    
  24.     strcpy(psz, "February");
  25.    
  26.     ppsz[2] = psz;    
  27.    
  28.     monitor();
  29.    
  30. }
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. //////////////////////////////////////////////////////////
  38. void monitor()
  39. {
  40.      for(int i = 1; i <= 2; i++)
  41.      {
  42.          printf("%s\n", ppsz[i]);    
  43.      }
  44.      
  45. }
  46.  
  47.  
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement