fwrite c
snippet in c

for loop c

user7670

for(int i = 0; i<n ;i++) //i is the number of iterations that occur
{						 //n is the total number of iterations
 //code here
}

fwrite c

user3481

fwrite (buffer /*ptr*/, 1 /*size [byteweise]*/, sizeof(buffer) /*nmemb*/, dstfile /*stream*/);