beginner – Getting text and date format

The task is to search for the pattern d – m – and —- all the incidences in the text, reformat it to yyyy: mm: dd and print it separately from the initial text. Actually I have done everything except formatting. And even in my written code I have some doubts because I have just started to learn this language. Maybe someone will help me and say what is wrong with my code and how to finish that task in a better way. Any comment is appreciated.

#include 
#include 
#include 

# define MAXLINE 1000
# define CONT 1000000

int getlin (char *, int);
int pickDates (char *, char *);
int isDate (char *, int);

int main ()
{
int len
char line[MAXLINE];
accumulation of char[CONT];
char * dates = malloc (sizeof (char *) * CONT);

while ((len = getlin (line, MAXLINE))> 0)
strcat (accumulation, line);

pickDates (dates, accumulation);
printf ("% s  n", dates);

free (dates);

returns 0;
}

int getlin (char * s, int lim) {
int i, c, j = 0;

for (i = 0; (c = getchar ())! = EOF && c! = & # 39;  n & # 39 ;; ++ i)
yes (i <lim - 2)
{
s[j] = c;
++ j;
}
yes (c == & # 39;  n & # 39;)
{
s[j] = c;
++ i;
++ j;
}
s[j] = & # 39;  0 & # 39 ;;

return i;
}

int pickDates (char * dates, char * cont)
{
int j = 0;
const char * template = "d - m - y ----";
char * date;
int temp_len = strlen (template);

for (int i = 0; i <strlen (cont); i ++)
yes (cont[i] == template[0] && cont[i+3] == template[3] && cont[i+6] == template[6])
{
date = malloc (sizeof (char) * temp_len);
memcpy (date, and cont[i], temp_len);
if (isDate (date, temp_len))
{
j + = 8;
strcat (dates, date);
}
free (date);
}

dates = realloc (dates, sizeof (char) * j);

returns 0;
}

int isDate (char * date_str, int len)
{
int i = 0;
int dd = atoi (& date_str[i+1]);
int mm = atoi (& date_str[i+4]);
int yy = atoi (& date_str[i+7]);
char tmp[5] = {& # 39; 0 & # 39;};

memset (date_str, 0, len - 3);
date_str = realloc (date_str, sizeof (char) * (len - 3));

yes (dd) < 32 && dd > 0 && mm < 13 && mm > 0 && yy> 0)
{
sprintf (tmp, "% 04d", yy);
strcat (date_str, tmp);
sprintf (tmp, "% 02d", mm);
strcat (date_str, tmp);
sprintf (tmp, "% 02d", dd);
strcat (date_str, tmp);

returns 1;
}
otherwise it returns -1;
}