If you would just read the info, its all there, with links to other interesting info about time.h. Here because I am nice is the way you want to do things.
Code:
#include <stdio.h>
#include <time.h>
int main ()
{
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
printf("Day of the month: %d\n", timeinfo->tm_mday);
printf("Month of the year: %d\n", (timeinfo->tm_mon) + 1);
printf("Day in the year: %d\n", timeinfo->tm_yday);
//int tm_mon; month (0 - 11 : 0 = January)
return 0;
}