maio
[h2N7SspZmY.git] / data / cache / 6 / 6e7b7b527f462b2bb874bc972cd4ffcc.code
blob1f63314b11fb0fff44f438ea0a696ece21e6015d
1 <span class="co2">#include &lt;stdio.h&gt;</span>
2 <span class="co2">#include &lt;time.h&gt;</span>
3 &nbsp;
4 <span class="kw4">int</span> main<span class="br0">&#40;</span><span class="br0">&#41;</span>
5 <span class="br0">&#123;</span>
6         time_t  currtime<span class="sy0">;</span>
7         <span class="kw4">char</span> charTime<span class="br0">&#91;</span>100<span class="br0">&#93;</span> <span class="sy0">=</span> <span class="br0">&#123;</span>0<span class="br0">&#125;</span><span class="sy0">;</span>
8         time<span class="br0">&#40;</span><span class="sy0">&amp;</span>currtime<span class="br0">&#41;</span><span class="sy0">;</span>
9         strftime<span class="br0">&#40;</span>charTime<span class="sy0">,</span><span class="kw4">sizeof</span><span class="br0">&#40;</span>charTime<span class="br0">&#41;</span><span class="sy0">-</span><span class="nu0">1</span><span class="sy0">,</span><span class="st0">&quot;%c&quot;</span><span class="sy0">,</span>localtime<span class="br0">&#40;</span><span class="sy0">&amp;</span>currtime<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
10         <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span class="kw3">printf</span></a><span class="br0">&#40;</span><span class="st0">&quot;time: %s<span class="es1">\n</span>&quot;</span><span class="sy0">,</span> charTime<span class="br0">&#41;</span><span class="sy0">;</span>
11         <span class="coMULTI">/* &quot;time: Sat Apr 17 11:43:47 2010&quot; */</span>
12 <span class="br0">&#125;</span>