This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ENEE 140: Introduction to Programming Concepts for Engineers [email protected] © Gang Qu Spring 2010 Week 5 Program Selection Lab report: Write program to answer the questions 1-3, and name them week05_1.c, week05_2.c, week05_3.c Submit by the following command: submit 2010 spring enee 140 010? 1 week05_1.c submit 2010 spring enee 140 010? 1 week05_2.c submit 2010 spring enee 140 010? 1 week05_3.c Due: 11:59 pm Monday, March 8. Lab 9: Monday March 1 1. file I/O: go through fileIO.c carefully and pay special attention to the followings: a. int main(int argc, char *argv) / * t h i s i s c a l l e d command line argument, you can just memorize this as a template for now */ b. FILE *section, *name, *message; / * d e c l a r e v a r i a b l e s o f FILE type */ c. name = fopen(argv, "r"); /* fopen(): command to open file; argv: the way to reference the arguments in the command line, is 0-offset; “r”, “w”, “r+”: permission of the file to be opened. */ d. fclose() e. fscanf() /* read in data from the file */ f.f....
View Full Document
This note was uploaded on 10/11/2010 for the course ENEE 140 taught by Professor Staff during the Fall '08 term at Maryland.
- Fall '08