Advertisement
dllbridge

Untitled

Jul 2nd, 2023
746
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.67 KB | None | 0 0
  1.  
  2. #include   <stdio.h>
  3.  
  4.  
  5. char sz1[10] =  "January";
  6. char sz2[10] = "February";
  7.  
  8.  
  9. char *pszMonths[14];
  10.  
  11.  
  12. ////////////////////////////////////////////////////
  13. int main()                                        //
  14. {
  15.    
  16.     char sz3[10] =    "March";
  17.     char sz4[10] =    "April";
  18.    
  19.     pszMonths[1] = sz1;
  20.     pszMonths[2] = sz2;
  21.     pszMonths[3] = sz3;
  22.     pszMonths[4] = sz4;
  23.    
  24.     printf("Address of  %9s = %d\n", pszMonths[1], pszMonths[1]);
  25.     printf("Address of  %9s = %d\n", pszMonths[2], pszMonths[2]);
  26.     printf("Address of  %9s = %d\n", pszMonths[3], pszMonths[3]);
  27.     printf("Address of  %9s = %d\n", pszMonths[4], pszMonths[4]);    
  28. }
  29.  
  30.  
  31.  
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement