How do I read fortran binary file in C?
问题 I have a binary file generated by fortran code. This file contains an array of doubles. I need to open it in my C program and then work with it as with an usual array. How do I do it? How double type is represented in binary file? 回答1: Almost all Fortran compilers, for unformatted (i.e., binary) sequential files, write the length of the record at the beginning and end of each record. Typically the length is written in four bytes, though some compilers use eight bytes. A record is everything