CSE15LFall13MidtermExamPracticeQuestions

Java rw rw r 1 u1 lec 168 may 7 1300 makefile now

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: ’ in the manual page for Unix command called “time”. 10. What is the function of the Unix environment variable “PATH”. 11. Which of the following will send standard error from prog to file, and discard standard output? a. prog > file < /dev/null b. prog > /dev/null 2> file c. prog < file > /dev/null d. prog 1> file 2> /dev/null 12. List two cons and two pros of unit testing. 13. Which file does make look for in the current working directory? 14. For this problem, consider this Makefile: A.class: A.java javac A.java B.class: A.class B.java javac B.java C.class: B.class A.class C.java javac C.java all: C.class B.class A.class a. Suppose ls - l produces this output: -rw-rw-r-- 1 u1 lec 150 May 7 13:16 A.java -rw-rw-r-- 1 u1 lec 81 May 7 13:25 B.java -rw-rw-r-- 1 u1 lec 189 May 7 13:20 C.java -rw-rw-r-- 1 u1 lec 168 May 7 13:00 Makefile Now running make all will cause what command(s) to be executed? List them. b. Suppose ls - l produces this output: -rw-rw-r-- 1 u1 lec 356 May 7 13:50 A.class -rw-rw-r-- 1 u1 lec 150 May 7 13:16 A.java -rw-rw-r-- 1 u1 lec 251 May 7 13:50 B.class -rw-rw-r-- 1 u1 lec 69 May 7 13:25 B.java -rw-rw-r-- 1 u1 lec 532 May 7 13:50 C.class -rw-rw-r-- 1 u1 lec 189 May 7 13:...
View Full Document

This document was uploaded on 03/02/2014.

Ask a homework question - tutors are online