Advertisement
dllbridge

Untitled

Jul 1st, 2023
840
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.  
  14.  
  15. ////////////////////////////////////////////////////
  16. int main()                                        //
  17. {
  18.    
  19.     char sz3[10] =    "March";
  20.     char sz4[10] =    "April";
  21.    
  22.     pszMonths[1] = sz1;
  23.     pszMonths[2] = sz2;
  24.     pszMonths[3] = sz3;
  25.     pszMonths[4] = sz4;
  26.    
  27.     printf("Address of  %9s = %d\n", pszMonths[1], pszMonths[1]);
  28.     printf("Address of  %9s = %d\n", pszMonths[2], pszMonths[2]);
  29.     printf("Address of  %9s = %d\n", pszMonths[3], pszMonths[3]);
  30.     printf("Address of  %9s = %d\n", pszMonths[4], pszMonths[4]);    
  31. }
  32.  
  33.  
  34.  
  35.  
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement