>>937 ちょっと変えた+インデント
#include <stdio.h>
#include <string.h>
int main(){
 const char* ifname = "sitei.csv";
 const char* ofname = "out.csv";
 FILE* ifp;
 FILE* ofp;
 char buf[1024];
 char* p;
 int line, num, d;
 ifp = fopen(ifname, "r");
 ofp = fopen(ofname, "w");
 if(ifp != NULL && ofp != NULL){
  for(line = 1; fgets(buf, 1024, ifp) != NULL; line++){
   p = buf;
   for(num = 0; ; num++){
    if(sscanf(p, "%d", &d) <= 0)break;
    if(num > 0)fprintf(ofp, ", ");
    fprintf(ofp, "%d", d + line);
    p = strstr(p, ",");
    if(p == NULL)break;
    p++;
   }
   fprintf(ofp, "\n");
  }
  fclose(ofp);
  fclose(ifp);
 }
 return 0;
}