{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


Assignment2specs - McGill University School of Computer...

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

View Full Document Right Arrow Icon
McGill University School of Computer Science COMP-206 Software Systems Assignment #2 Due: February 18, 2011 on Web CT at 23:55 The assignments in this course lead you, by the end of the course, to develop a web application. As we do that we also learn how to properly engineer a program using standard available tools, like GNU and the Unix environment. This assignment continues in that theme. Every good web site needs a secure login page. A secure login page implies that information is encrypted. Our second question is just that, an encryption algorithm in C. It will be eventually used in your web site. The last question asks you to create a bash program that helps you compile complex programs, while providing you some sound automated engineering procedures. Our first program is not related to the web site and is there to help you learn how to use C. Question 1: C Programming At the command line, cd to your source directory and create a sub-directory called ass2. In that sub-directory vi a file called a2q1.c and in that file write the following program : Write a C program that asks the users for characters, one at a time, and prints out their ASCII value until they input the number zero. Note: It is best, to not use the char type, instead use the int. Your program should output: Welcome to ASCII: ----> f ascii: 102 ----> 3 ascii: 51 ----> 0 ascii: 48 Done. Notice in the output above the program begins with a title and then shows a prompt. The user inputs a single character (in the example user input is in bold). The program responds with the message 'ascii:' and displays the ASCII value, and repeats the prompt. The user then continues to input more characters until they want to quit. At that point the user input the character zero, its ASCII value is displays, and the program terminates with a message. Your program should look and behave as above. jvybihal Page 1 2/4/2011
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
McGill University School of Computer Science What to hand in: You only need to hand in the final version of your a2q1.c source file and its executable. Make sure the executable has been compiled in the Trottier labs or they will not run on the TA's account. Submit to WEB CT. Question 2: Ciphers A semi-advanced cryptographic method is called the Grid Caesar Cipher. This method uses an integer number and a two dimensional array to encrypt messages. This method combines Simple Caesar Cipher with a transposition matrix.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}