This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % answer in line1. % % Write your code here: line1 = fgets(fid1); l % c) fgetl(). Now read the second line of file1 using fgetl(). Store your % answer in line2. % % Write your code here: line2 = fgetl(fid1); l % d) fprintf(). Write line1 to file2. You will first need to open the file % with write access. % % Write your code here: fid2 = fopen(file2,'w'); fprintf(fid2,line1); f % e) fclose(). Use fclose() to close both file1 and file2. Do NOT use % fclose all. % % Write your code here: fclose(fid1); fclose(fid2);...
View Full Document
This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Tech.
- Spring '08