I have a question here that I cant find anywhere. I have been looking for the longest and my professors are useless. I'm trying to create N amount of files inside a for loop in C. I've tried the following code...and clearly that doesn't work, how do i go about make these files inside a for loop?
int i;
int N = 10;
for(i = 0; i < N; i++)
{
fopen(("file%d",i),"w");
}
sprintfcan be dangerous (and is becoming deprecated). Should usesnprintf