Semplificato il codice e "aggiustato" l'ordine delle diagonali:
#include <stdio.h>
#define R 5
#define C 5
int main()
{
int m[R][C] = {{ 0, 1, 2, 3, 4},
{ 5, 6, 7, 8, 9},
{10, 11, 12, 13, 14},
{15, 16, 17, 18, 19},
{20, 21, 22, 23, 24}};
int v[R + C - 1] = {0};
for(unsigned int i = 0; i < R; ++i)
{
for(unsigned int j = 0; j < C; ++j)
{
v[R + j - i - 1] += m[i][j];
}
}
for(unsigned int i = 0; i < R + C - 1; ++i)
{
printf("%d ", v[i]);
}
return 0;
}