This preview shows pages 1–2. Sign up to view the full content.
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@example.com 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
- Fall '08