CS101_mt2_fall11_for - CS101 Fall 2011 Midterm II(60 minutes Thursday November 3rd 2011 Name Section READ and complete the following • Bubble

Info iconThis preview shows pages 1–5. 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

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: 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. 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 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 : (a) mkdir backup move myfile . c myfolder cp myfolder / * backup (b) mkdir backup mv myfile . c myfolder cp myfolder / * backup (c) nfolder backup move myfile . c- - > myfolder cpy myfolder / myfile . c- - > backup (d) mkdir backup mv myfolder myfile . c cp myfolder / ALL backup 4. You are in your home directory. The home directory contains a subdirectory called lab9 . Select the command that, when entered into the terminal, will delete the lab9 subdirectory as well as ALL of its contents: (a) delete lab9 (b) rm lab9 (c) remove lab9 (d) rm -r lab9 5.5....
View Full Document

This note was uploaded on 01/19/2012 for the course CS 101 taught by Professor Gambill during the Spring '08 term at University of Illinois, Urbana Champaign.

Page1 / 17

CS101_mt2_fall11_for - CS101 Fall 2011 Midterm II(60 minutes Thursday November 3rd 2011 Name Section READ and complete the following • Bubble

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

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