title: How to print individual members of a struct
body: <p>I need to print out the current date in the following format : Today is Wednesday - September 7, 2012. I know I will have to use the struct</p>
  
  <pre><code> struct tm* time_info;
  </code></pre>
  
  <p>I can easily accomplish this using strftime(), however, I am tasked to NOT use strftime() and extract members of the struct directly using printf statements. I cannot seem to get it to properly work. Any clues? Here is my current code:</p>
  
  <pre><code> #include &lt;stdio.h&gt;
   #include &lt;sys/types.h&gt;
   #include &lt;time.h&gt;
   #include &lt;stdlib.h&gt;
  
   /* localtime example */
   #include &lt;stdio.h&gt;
   #include &lt;time.h&gt;
  
   int main (void)
   {
   time_t t; 
   char buffer[40]; 
   struct tm* tm_info; 
  
   time(&amp;t); 
   tm_info = localtime(&amp;t);
   strftime(buffer, 40, " Today is %A - %B %e, %Y", tm_info); 
   puts(buffer); 
  
  
    return 0;
  }
  </code></pre>
  
  <p>Instead of  </p>
  
  <pre><code> strftime(buffer, 40, " Today is %A - %B %e, %Y", tm_info); 
  </code></pre>
  
  <p>I need </p>
  
  <pre><code> printf("Today is %s, struct members info in the correct format);
  </code></pre>