Week05 - ENEE 140: Introduction to Programming Concepts for...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ENEE 140: Introduction to Programming Concepts for Engineers gangqu@umd.edu 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[2], "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

Page1 / 3

Week05 - ENEE 140: Introduction to Programming Concepts for...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online