How to generate several files in C -


I want to generate 60 files, program0.txt, .., program59.txt how can I do this?

My attempt:

  FILE * fp [60]; (I = 0; i & lt; 60; i ++) {FP [i] = FOPAN ("program.txt", "w"); Fprintf (fp [i], "zero = ["]; }  

file name [] using filenames below

  Four filenames [15]; Int i; (I = 0; i & lt; 60; ++ i) {sprintf (filename, "program% 02d.txt", i); // printf ("% s \ n", file name); / * Fp [i] = Fopen (filename, "W"); .... Falcos (FP [Ii]); * /}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -