MidtermII216Spring14Soln - University of Maryland College Park Dept of Computer Science CMSC216 Spring 2014 Midterm II Key Last Name(PRINT First

MidtermII216Spring14Soln - University of Maryland College...

This preview shows page 1 - 4 out of 9 pages.

1 University of Maryland College Park Dept of Computer Science CMSC216 Spring 2014 Midterm II Key Last Name (PRINT): _____________________________________________________ First Name (PRINT): _____________________________________________________ University Directory ID (e.g., umcpturtle)_____________________________________ Lab TA (Circle One): Kevin(0101(8am) /0102(9am)) Lee (0104(4pm)/0203(3pm)) Matt (0302(2pm)) Nathan (0303(3pm)/0304(4pm)) Robert (0202(1pm)/0301(12pm)) Walker (0103(10am)/0201(11am)) I pledge on my honor that I have not given or received any unauthorized assistance on this examination. Your signature: _____________________________________________________________ Instructions 1. If a question depends on the architecture involved, assume the question applies to behavior on linux.grace.umd.edu. 2. This exam is a closed-book and closed-notes exam. 3. Total point value is 200 points. 4. The exam is a 75 minutes exam. 5. Please use a pencil to complete the exam. 6. WRITE NEATLY. 7. You don’t need to use meaningful variable names; however, we expect good indentation. Grader Use Only #1 Problem 1 (Makefile) (30) #2 Problem 2 (Strings/IO) (50) #3 Problem 3 (Linked Lists) (60) #4 Problem 4 (Assembly) (60) Total Total (200) (200)
Image of page 1
2 Problem #1 (30 pts) Write a makefile that will allow us to build an executable for the system associated with the code below. 1. You may not use implicit rules. If you do you will get 0 credit for this problem . 2. Targets a. car We should be able to create an executable named car that executes the main function. b. Your makefile will execute the car target by default (i.e., if we type “make” the car target will be processed). c. Feel free to add any other targets you understand are necessary. d. You do not need to use the .PHONY directive. e. You can assume CC = gcc and CFLAGS = -Wall –g. You don’t need to define them in your makefile, but you need to use them. f. You don’t need to add an all target. g. You don’t need to add a clean target. 3. Keep in mind that engine.c should not be recompiled if only car.c is changed.
Image of page 2
3
Image of page 3
Image of page 4

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture