Extracting and reformatting dates from text
Whenever declaring a function that you only expect to use in the current file, mark it static.

The (anonymous) user in the comments above is correct to indicate that accum is quite large; however, rather than allocating it statically as a global I'd suggest that it be allocated from the heap (malloc).

printf("%s\n", dates) is equivalent to puts(dates), but the latter is more efficient.

Having to predeclare variables in C hasn't been needed since the 90s. Do not predeclare variables. Declare them where they're used; i.e.

for (int i = 0;


That loop doesn't do what you think it does. You're missing braces. The loop will only apply to the first if.

j += 8


Where does 8 come from? Declare this as a constant. Magic numbers are bad.

It's pointless to have a return value for pickDates, so make it void.

date_str in isDate should be a const char * because you shouldn't be modifying it. The same applies to dates in pickDates.

Later, where you have a series of sprintf / strcat, do not use strcat, nor a tmp array. You can write to date_str via a temporary pointer that you increment based on the return value of sprintf.

I suggest inverting this logic:

if (dd &lt; 32 &amp;&amp; dd &gt; 0 &amp;&amp; mm &lt; 13 &amp;&amp; mm &gt; 0 &amp;&amp; yy &gt; 0)
{
    // ...
    return 1;
}
else return -1;


to

if (dd &lt; 0 || dd &gt; 31 || mm &lt; 0 || mm &gt; 12 || yy &lt; 0)
    return -1;
// ...
return 1;


Also, if that return value indicates success or failure, you should use a boolean from stdbool.h and use true/false instead of an integer.

This:

int i = 0;
int dd = atoi(&amp;date_str[i+1]);
int mm = atoi(&amp;date_str[i+4]);
int yy = atoi(&amp;date_str[i+7]);


doesn't make a whole lot of sense; i might as well not exist and you might as well do

int dd = atoi(date_str + 1),
    mm = atoi(date_str + 4),
    yy = atoi(date_str + 7);