#include <stdio.h>
#include <time.h>
int main(void)
{
time_t now;
time(&now);
struct tm begin;
begin = *localtime(&now);
begin.tm_hour = 0;
begin.tm_min = 0;
begin.tm_sec = 0;
begin.tm_mday = 1;
double seconds = difftime(now, mktime(&begin));
printf("%.f seconds passed since the beginning of the month", seconds);
return 0;
}
/*
run:
2305103 seconds passed since the beginning of the month
*/