Advertisement
dllbridge

Untitled

Nov 20th, 2024
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.64 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.     psz = (char*)malloc(15);
  22.  
  23.     strcpy(psz, "February");
  24.    
  25.     ppsz[2] = psz;    
  26.     monitor();
  27.    
  28. }
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35. //////////////////////////////////////////////////////////
  36. void monitor()
  37. {
  38.      for(int i = 1; i < 3; i++)
  39.      {
  40.          printf("%s\n", ppsz[i]);    
  41.      }
  42.      
  43. }
  44.  
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement