File Input and Output
File Input and Output 1 / 9
File Input and Output File Input and Output 1 / 9 File - - PowerPoint PPT Presentation
File Input and Output File Input and Output 1 / 9 File input/output input function reads values entered by a user. File Input and Output 2 / 9 File input/output input function reads values entered by a user. load function read data from a
File Input and Output 1 / 9
File Input and Output 2 / 9
File Input and Output 2 / 9
File Input and Output 2 / 9
File Input and Output 2 / 9
File Input and Output 2 / 9
File Input and Output 3 / 9
File Input and Output 3 / 9
1
2
3
File Input and Output 3 / 9
File Input and Output 4 / 9
File Input and Output 4 / 9
File Input and Output 4 / 9
File Input and Output 5 / 9
File Input and Output 5 / 9
File Input and Output 5 / 9
1
2
3
File Input and Output 5 / 9
1
2
3
File Input and Output 5 / 9
1 Open the file 2 Check to make sure that the file has been open successfully or
3 Close the file and check to make sure that the file has been closed
File Input and Output 6 / 9
File Input and Output 7 / 9
File Input and Output 7 / 9
File Input and Output 7 / 9
1 Use fscanf to read the data in the file emissions.txt 2 Use the data to plot the growth of concentration of C02 over time 3 Use the data to plot the annual percentage increase in C02
4 Save the annual percentage increase values in a file. File Input and Output 8 / 9
1960 1970 1980 1990 2000 2010 Year 320 330 340 350 360 370 380 390 400 C02 concentation in ppm Global C0 2 concetration 1960 1970 1980 1990 2000 2010 2020 year 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 % increase in average Annual percentage increase
File Input and Output 9 / 9