Advertisement
dllbridge

Untitled

Jul 12th, 2023
1,218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.95 KB | None | 0 0
  1.  
  2.  
  3.  
  4. #include   <stdio.h>
  5.  
  6. const char *pszMonths[14] = { "", "January",                           // The element with index 0 will not be used,                                  
  7.                                  "February",
  8.                                     "March",
  9.                                     "April",
  10.                                       "May",
  11.                                      "June",
  12.                                      "July",
  13.                                    "August",
  14.                                 "September",
  15.                                   "October",
  16.                                  "November",
  17.                                  "December"
  18.                             };
  19.  
  20. ////////////////////////////////////////////////////
  21. int main()                                        //
  22. {
  23.  
  24.     char *p;
  25.  
  26.     for(int i = 1; i <= 12; i++)
  27.     {
  28.         printf(  "%d  ",  pszMonths[i] );              
  29.         printf("%10s\t",  pszMonths[i] );  
  30.  
  31.         p = (char*)pszMonths[i];
  32.  
  33.         do{  printf("%2X, ", *p);
  34.        
  35.              p++;
  36.        
  37.           }  while(*p);
  38.        
  39.         printf("%2X\n", *p);
  40.     }
  41. }
  42.  
  43.  
  44.  
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement