I am compiling a FORTRAN code using gfortran (gfortram -o code.f code) and preparing an executable (code). It is compiled but the executable (code) looks like a file. How to solve this problem.

I am compiling a FORTRAN code using gfortran (gfortram -o code.f code) and preparing an executable (code). It is compiled but the executable (code) looks like a file. How to solve this problem.

Assuming your source is called source.f and the output is output, the syntax is
gfortran -o output source.f
-ooption is where to output the compiled code & it's normally not given acode.ftype of name, that's usually used for the input you've used the namecodefor.... ie.[-o outfile] infile...is fromman gfortran; you appear to have file order reversed. – guiverc Jul 13 '22 at 06:45