Practice Midterm - Name First Student ID Last Section...

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

View Full Document Right Arrow Icon
Page 1 of 8 Name: Section: F i r s t L a s t Student ID: University of Maryland College Park Department of Electrical and Computer Engineering Midterm Examination I ENEE 140 Introduction to Programming Concepts for Engineers Tuesday, October 20, 2009 3:30 pm – 4:45 pm 1. Closed book, closed notes, no calculators allowed. 2. It is your responsibility to write legibly. Unclear answer will be marked as wrong. 3. It is crucial to show all your work on the provided paper. Partial credits may be granted based on your work if it is not fully correct. 4. The bonus will be added to the total score, but not to exceed 100. 5. Manage your time, as the problems are not sorted by their difficulties. 6. The bonus problem can be challenging to implement it in a decent way. Don’t spend too much time on it unless you do have time left. Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Bonus Total (18 pts) (16 pts) (16 pts) (30 pts) (20 pts) (10 pts) (100 pts)
Background image of page 1

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

View Full Document Right Arrow Icon
Page 2 of 8 1. (18 points, 2 points each.) E x p l a i n w h a t t h e f o l l o w i n g U N I X c o m m a n d s d o : a. ls -l b. cd proj1 c. mv p1.c p1.bak.c d. gcc p1.c -o p1.out e. p1.out < input.txt > output.txt f. mkdir backup g. cp p ro j1 .c backup /p1 .c
Background image of page 2
Page 3 of 8 2. (16 points) A n s w e r t h e f o l l o w i n g q u e s t i o n s . a. Give the two ways to declare the value 3.1416 as a constant named PI ? b. In the project, your program needs to read in inputs from two files and write output to another file , where all the file names will be provided by the user in the UNIX command line when executing the program, what will be the prototype for your main() function? That is, instead of int main (void) , what do you use in your program? Suppose the executable of your program is called
Background image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 8

Practice Midterm - Name First Student ID Last Section...

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

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