Solution for Exercise 21-5
ex2105
#include <stdio.h> #include <time.h> int main() { time_t tictoc; struct tm *today; time(&tictoc); today = localtime(&tictoc); printf("Today is %d/%d/%d\n", today->tm_mon, today->tm_mday, today->tm_year); return(0); }
Output
Today is 4/18/120
Notes
* No, you didn't goof up. Keep reading in the book.
Copyright © 1997-2024 by QPBC.
All rights reserved