This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Midterm Answers – CS 246 Fall 2009 Instructor: Peter Buhr October 27, 2009 These are not the only answers that are acceptable; these answers come from the notes or lectures. 1. (a) 2 marks A shell is a program that reads commands and interprets them. (b) 3 marks File names are organized in a hierarchy: directories are vertices, files are leaves. (c) 2 marks Hidden files start with “ . ” (dot) and are hidden because they contain administrative information. (d) 3 marks [!xyz] * .cc (e) 3 marks Users are organized into groups user / owner , group , other , with access control read , write , execute / search . 2. (a) 1 mark The range of values for int is machine specific. (b) 2 marks i : 3, k : 3, i : 4, i : 4 (c) 3 marks i. A string cannot contain a character with the value ′ \0 ′ . ii. String operations needing the length of a string must linearly search for ′ \0 ′ , which is expensive for long strings. iii. Management of variable-sized strings is the programmer’s responsibility, with complex storage management problems....
View Full Document
This note was uploaded on 01/14/2012 for the course CS 246 taught by Professor Wormer during the Fall '08 term at Waterloo.
- Fall '08