I want to print many, for example 100, floating point number into one file line using the format string %10.2f. Are there any ways to do this without writing the format string 100 times in the fprintf call or must I using the for loop to print one at a time? I know it’s easy to achieve this in Fortan:
`fwrite(fd,'(100F10.2)') data`
Are there an alternative in C?
Use a
forloop. That will be able to print 100 floating point numbers