home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_11 / 606.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-19  |  561KB  |  2550x3300
Labels: book | crt screen | daybook | reckoner
OCR: 606 Chapter 1 C Library and Preprocessor Facilities Example 11-1: timex.c timex.c Synopsis Displays today time and date, the date tomorrow and the processor time used the progr cam. oqo ective TO int roduce the time and date library funct. ions Incl lude Files #inc. #incl lude Lude <time <stdio h> h> Note int main void time tl; Note 2 struct tr *tptr, C. lock cks Note char Note 3 time (( time t 0 1= time ct ime( Note 4 printf cu rentdate is $s", tptr printf loca. t ime( row is &t1 $//02% in" Note Note6 tptr->tm 1 tptr->tm mday+1, tptr->tm year 100 else Printf( "Error with the time () functi \n" (( ticks clock I = clock -1 Note printf seconds used by the processor \n" (double) icks 'CLK TCK ) Note 8 else pri intf( with the clock) functi ion In" return 0 Svnopsis program jective localt secan ...