有程序:CHARACTER *4STR1,STR2,STR3
OPEN(UNIT=15,FILE=‘INPUT.DAT',STATUS=‘OLD')
READ(15,10)STR1,STR2,STR3
10FORMAT(A6,1x,A5,1x,A4)WRITE(*,'(1x,3A)')STR1,STR2,STR3
CLOSE(15)
END
用此程序从文件INPUT.DAT中读出字符串'FORMAT
(来学网)A
NEW
DISK',程序运行结果是:
- A.
FORMA
(来学网)NEWDISK
- B.
RMAT
(来学网)NEWDISK
- C.
FORMATA
(来学网)NEW
- D.
MATA
(来学网)NEWDISK