Dalhousie University CSCI 2132 — Software Development Fall 2011 Assignment 3 Distributed Wednesday, October 12, 2011. Due 11AM, Wednesday, November 2, 2011. Instructions: 1. Each question in this assignment requires you to create one or more regular ?les on bluenose. Use the exact names (case-sensitive) as speci?ed by each question. 2. Submit the following ?les electronically using the command submit: a3q1_hello.c, a3q1.txt, a3q2.txt, a3q3.c, a3q4a.c, and a3q4b.c. The instructions of using submit can be found at: http://web.cs.dal.ca/ mhe/csci2132/assignments.htm ~ 3. The C programs will be marked for correctness, design, and style/documentation. Please refer to the following web page for guidelines on style and documentation for short C programs (which applies to this assignment): http://web.cs.dal.ca/ mhe/csci2132/assignments.htm ~ You will lose a lot of marks if you do not follow the guidelines on style and documentation. 4. Printallthesubmitted?lesexcepta3q1.txt,andputthehardcopiesintotheCSCI2132 assignment boxes in the second ?oor of the Faculty of Computer Science building by the deadline. For this you are allowed to use whichever way you prefer to print, as long as you do not edit the content or reformat the ?les. You can print multiple ?les on the same sheet of paper, but write clearly, with a pen, which ?le is for which question. Write down your name, your student ID and your CS username (i.e. your username on bluenose) on the ?rst page of the print out. Do not hand in the hard copies to the instructor or TAs. Questions: 1. [8 marks] The program hello.c shown in class prints out the sentence hello, world followed by a newline character on the screen. It also returns 0 as the exit code to the UNIX shell.(i) [3 marks] Rewrite the program so that it returns 1 as the exit code to the UNIX shell. Usea3q1_hello.castheCsource?lename. Forthisquestiononly,youare not required to write any comments in your code, but proper style (indentation, white spaces, etc.) is...
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here