{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS101_mt2_fall11_formA - CS101 Fall 2011 Midterm II(60...

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

View Full Document Right Arrow Icon
CS101 Fall 2011 Midterm II (60 minutes) Thursday, November 3rd, 2011 Name: Section: READ and complete the following: Bubble your Scantron only with a No. 2 pencil. On your Scantron (shown in the figure below), bubble : 1. Your Name 2. Your NetID 3. Form letter " A " 4. Bubble the corresponding 3-digit code (shown below) for your lab section on your Scantron. Time Monday Tuesday Wednesday Thursday 9:00-10:50 101 104 107 109 11:00-12:50 102 110 1:00-2:50 105 111 3:00-4:50 103 106 108 112 No electronic devices, books, notes, or cheat sheets are allowed while taking this exam. Please fill in the most correct answer on the provided Scantron sheet. We will not answer any questions during the exam. Each question has only ONE correct answer. You must stop writing when time is called by the proctors. Hand in both these exam pages and the Scantron. DO NOT turn this page UNTIL the proctor instructs you to.
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
1. The file lab6 . c is in your current working directory and utilizes the math . h package. Select the com- mand(s) that, when entered into the correct location, will correctly compile the file named lab6 . c using the gcc compiler. (a) TERMINAL : gcc lab6 . c GEDIT : (b) TERMINAL : - lm GEDIT : gcc lab6 . c (c) TERMINAL : gcc lab6 . c - lm GEDIT : (d) TERMINAL : gedit lab6 . c & GEDIT : lab6 . c - lm 2. Below is a list of common UNIX file system actions. Select the list of Unix commands that correspond with the four file system actions. 1 ) Copy a file 2 ) Delete a file 3 ) Print working directory 4 ) List the contents of a directory (a) 1 ) cp 2 ) del 3 ) print 4 ) ls (b) 1 ) copy 2 ) rm 3 ) pwd 4 ) ls (c) 1 ) cpy 2 ) del 3 ) pwd 4 ) pwd (d) 1 ) cp 2 ) rm 3 ) pwd 4 ) ls
Background image of page 2
3. You are in your home directory, with the following contents: Subdirectories : myfolder Files : myfile . c Select the sequence of commands that, when entered into the terminal, will CREATE a new subdirectory named backup , then MOVE the file myfile . c into the subdirectory myfolder , and then COPY all of the contents of myfolder into the subdirectory backup :
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 ]}